ZOC

ZOC TABLE OF CONTENTS

Welcome to ZOC

Quick Start Guides

Telnet Quick Start

SSH Quick Start

ISDN Quick Start

Modem Quick Start

Scripting/Programming Quick Start

System/Network Administrators Quick Start

Updating from earlier Versions

Starting ZOC (Command Line Parameters and Environment)

Command Line Parameters

The ZOC.CFG File

Working Directory/Network

Environment Variables

Startup REXX Programs

Screen Elements

Menu

Toolbar

Custom Button Bar

Main Window

Local Typing

Status Line

Menu Commands

File Menu

Edit Menu

View Menu

Logging Menu

Transfer Menu

Script Menu

Options Overview

Options Menu

Quick Connection

Host Directory

Changing a Host Directory Entry

Host

Options

Login

BBS

Info

Window

The AutoConnect Feature

Importing other Host Directorys

Other Functions

Browse Window

File Transfer Window

File Transfer Game

MINIHOST

Customizing ZOC

Program Settings

AutoConnect

Clipboard

Confirmation

Device Responses

Disconnect Action

Directories

Miscellaneous

Host Directory Dialog

Scrollback

Protection

Printer/Sounds

Special Files

Window/Scrollback

Keyboard, Character Translation, etc.

Redefining the Keyboard

Redefining One Key

Translation of Inbound/Outbound Characters

Setting up the Phone Cost Description

Setting up the Toolbar

Session Options

Device Options

Terminal Options

Emulation Options

File Transfer Options

Logging Options

Creating a Modem Init String

Modem Options

Definition of the AutoMacros

Definition of the User Button Bar and F-Keys

Window Characteristics

Font and Window Size

Fonts, Window Size, Colors

Action-Code Assistant

Input/Output Devices

About the Telnet Device

About the Serial/Modem Device

About the ISDN Device

About the Rlogin Device

About the Secure Shell (SSH) Device

About the Named-Pipe Device

About the Windows-Modem Device (Windows only)

Programming ZOC (REXX/DDE)

Introduction to REXX

REXX Language Elements

Introduction to DDE

ZOC-REXX Functions for Communications

Updates, Author, Email, Orders, ...

Where/How to Order

Contacting EmTec

Contacting Enterprise Alternatives

The ZOC Mailing List

Places to Find Updates

About the Evaluation Version of ZOC

ZOC Versions

Other Copyrights

APPENDIX

Features You May Have Missed

Function Shortcuts

VT102/VT220 Special Keys on the PC Keyboard

IBM 3270 Special Keys on the PC Keyboard

IBM 5250 Special Keys on the PC Keyboard

Key Names for ZocSendEmuKey/^KEY

Special Codes (Ctrl-Characters & Power Codes)

ZOC-REXX Commands/Functions

Common Questions (How-To Guide)

Common Problems and Questions (Trouble Shooting Guide)

Credits


Welcome to ZOC

ZOC - A Powerful Terminal Emulator
(C) EmTec Innovative Software 1995 - 2003
http://www.emtec.com

What is ZOC

ZOC is an award winning terminal emulator which lets you access character based hosts via telnet, modem, SSH, ISDN and other means of communication.  It can be used to connect to Unix/Linux hosts and shell accounts, BBSes, IBM 3270 mainframes or internet muds.

Besides widely used terminal emulations like vt102, vt220 and several types of ansi ZOC supports emulations like linux, ibm3270 and Sun's CDE.  The program also features major file transfer protocols like X-, Y- and Zmodem as well as Kermit and others. All these are offered in solid implementations that leave nothing to be desired.

ZOC is highly configurable and offers the usual terminal features like keyboard redefinition and scroll back buffer as well as some advanced and unique functions among which are a powerful script language, automatic triggering of actions based on received or typed text or a hex dump and data trace feature.

Start here: Quick Start Guides for

o Telnet
o Secure Shell (SSH)
o ISDN
o Modem
o Scripting/Programming
o System/Network Administrators and
o Upgraders.

Other overviews to start with:

o Screen Elements
o The ZOC Menu (Functions)
o ZOC command line
o Orders/Updates/Author
o Common problems
o Features you might have missed


Quick Start Guides

Welcome to ZOC

ZOC is an award winning terminal emulator which lets you access character based hosts via telnet, modem, SSH, ISDN and other means of communication. Below you find a list of tutorials about how to use ZOC with various communication mechanisms and about other common tasks.

Telnet
Secure Shell (SSH)
ISDN
Modem
Scripting/Programming
System/Network Administrators
Upgrading from 3.xx Versions


Telnet Quick Start

If you want to connect to a host via telnet, select File, Quick Connection. This will bring up a dialog where you can select telnet from the list of devices.  Then enter your destination, select the desired emulation.  The destination in the 'Connect to' box can either be a host name or ip address and an optional port, for example  bbs.fonix.org or mail.somewhere.com:smtp. Then select an emulation (vt220  will work in most cases).

If you are using telnet often, you may want select the telnet device (and other settings) as your default. To do this, open Options, Session Profile, and select telnet in the Device tab and an emulation from the Emulation tab, then click Save.

To put a telnet host into the host directory go to File, Host Directory, click Add, enter a name for the entry and the IP Address and select Telnet as the communications device.  Also, you can specify an emulation in the Options tab.  To have ZOC learn your login procedure for later replay, enable 'Learn AutoLogin next time' in the Login tab.

Other related topics: See how to specify special Telnet related issues like options, host names, ports etc. Check out the /TELNET command line parameters. Find out how to configure ZOC as the web browser's telnet client in how-to questions. Last but not least please click the Help button in the dialog where you enter the host directory entry details.


SSH Quick Start

If you want to connect to a host via Secure Shell (SSH), select File, Quick Connection. This will bring up a dialog where you can select SSH from the list of devices.  Then enter your destination, select the desired emulation.  The destination in the 'Connect to' box can either be a host name or ip address and an optional port, for example  ssh.somwhere.org or secure.somewhere.com:10022. Then select an emulation (vt220 will work in most cases).

If you are using SSH often, you may want select the SSH device (and other settings) as your default. To do this, open Options, Session Profile, and select SSH in the Device tab and an emulation from the Emulation tab, then click Save.

To put a SSH host into the host directory go to File, Host Directory, click Add, enter a name for the entry and the host name or ip address. Then select Secure Shell as the communications device.  Also, you can specify an emulation in the Options tab.

To transfer files over SSH connections, please use Zmodem (see the description for the Secure Shell (SSH) Device).

Other related topics: See how to specify special SSH related issues like options, host names, ports etc.

Check out the /SSH command line parameters to start ZOC with an SSH session from the command line.. Last but not least please click the Help button in the dialog where you enter the host directory entry details.


ISDN Quick Start

Please note that this section applies to internal ISDN boards with CAPI drivers only.  For external ISDN boxes or boards with Windows Modem drivers please read the Modem Quick Start. If you want to make a ISDN CAPI connection, select File, Quick Connection. This will show a dialog where you can select your destination, desired emulation and communication device.  In the 'Connect to' box enter the phone number, then select an emulation (vt220 will work in most cases) and pick ISDN CAPI from the device list.

If you are using ISDN often, you may want to select the ISDN device (and other settings) as your default. To do this, open Options, Session Profile, and select ISDN in the Device tab and an emulation from the Emulation tab, then click Save.

To put an ISDN host into the host directory go to File, Host Directory, click Add, enter a name for the entry and the phone number and select ISDN CAPI as the communications device.  Also, you can specify an emulation in the Options tab.  To have ZOC learn your login procedure for later replay, enable 'Learn AutoLogin next time' in the Login tab.

If you want to use ZOC as an ISDN terminal emulation either select ISDN CAPI (for internal ISDN boards) or Serial/Modem (for ISDN modems) or Windows-Modems (internal/external ISDN hardware) from Options, Session Profile, Device.

Other related topics: More about the ISDN CAPI device can be found in CAPI device information.  Also check out common problems about problems you might encounter when accessing an ISDN board through CAPI. Last but not least please click the Help button in the dialog where you enter the host directory entry details.


Modem Quick Start

If you want to make a Modem or ISDN Modem connection, you will first have to select the default COM port or Modem driver. To do this, open Options, Session Profile, and select the Device Tab. There either choose Serial/Modem (if you want to access the modem through the com port directly) or Windows-Modem and make the appropriate settings.  You might also want to go to the Emulation tab and select your default emulation.  Then click Save.

Having that done, you can make a connection by choosing (from the menu) File, Quick Connection. This will show a dialog where you can select your destination.  In the 'Connect to' box enter the phone number and click 'OK'. To put an modem host into the host directory go to File, Host Directory, click Add, enter a name for the entry and the phone number and select the communications device (Serial/Modem or Windows Modem) and click the Device Options button to configure them. Also, you can specify an emulation in the Options tab.  To have ZOC learn your login procedure for later replay, enable 'Learn AutoLogin next time' in the Login tab.

Other related topics: More about the Modem device can be found in Serial/Modem and Windows Modems. Also, if you are using Serial/Modem, check out modem configuration.


Scripting/Programming Quick Start

If you want to use scripting to automate tasks with ZOC learn more about ZOC's scriping language in Introduction to REXX Programming, REXX Overview and ZOC-REXX Commands.  Also Dynamic Data Exchange might be of interest.

And do not miss our samples in SCRIPT\RXSAMPLE\*.ZRX. If you want to run scripts from the command line scripts, please do not miss the /RUN: and /U paramters in command line parameters


System/Network Administrators Quick Start

If you are a system or network administrator and if you want to set up ZOC for users in your organization the following topics will be of interest:

Command Line Options

ZOC offers a set of command line parameters  to run it in special modes or make it perform operations directly after startup.  When checking the command line options especially check /CALL, /RUN, /RESTRICT, /U and /WD.  These can be put into the shortcut icon which starts ZOC or in a file called ZOC.CFG (the latter could be part of a custom installation, see below).

Configuration Files

If you need to replicate ZOC configurations throughout your organization, the necessary files will be ZOCHOSTS.INI (host directory), STANDARD.CFG (program options), *.ZOC (session profile), *.ZKY (keymaps) and maybe the files in SCRIPT\*.ZRX.

Licensing

Usually software license codes will be stored in the Windows registry under HKEY_LOCAL_MACHINE+Software+EmTec+ZOC4+Registration. Alternately ZOC offers file based licensing and license counting which can be used with custom or network installations (see below). Please contact EmTec Support for details).

Network Installation

ZOC can be installed on a network drives and can use shared or individual configurations in read-only or write-access mode. ZOC can be tailored to use host directory files, options files or options directories in various locations by using command line options and/or by defining the directories in Options, Program Settings. If necessary, EmTec Support will help you to find the best network installation configuration and licensing code handling option for your individual environment.

Building a Custom Setup

You can modify the ZOC installation to fit your special needs.  The main installation file (zoc999_win_english.exe) is a self extracting ZIP archive.  You can unzip into a temporary directory (e.g. Z:\CDINST) with any standard unzip tool.

There you will find two files named SETUP.CFG and SETUP.FIL.  SETUP.CFG is the installation script and controls the default directory name and the icons in the Windows start menu.  SETUP.FIL is a ZIP archive, which contains a complete ZOC program directory including default configuration files.  You can replace the default configuration files and/or add your own files into this archive.  Alternately can create an additional ZIP archive named CUSTOM.FIL which will be unpacked into the program directory after the files from SETUP.FIL have been extracted.

Then you can burn the Z:\CDINST directory on CD or make it available to licensed users in your organization as a LAN resource.  In both cases, the custom version will be installed when the users run SETUP.EXE.

Unattended Installation

The ZOC setup does not support unattended installation.  However, you can simply replicate a ZOC program directory from a previous installation to other PCs and create the necessary icons/shortcuts with your own bulk setup tools.

If you have any further questions regarding installation, custom versions or licenses please contact Markus Schmidt at EmTec for Support.


Updating from earlier Versions

If you are upgrading from an earlier version of ZOC, you should find your way around in the new version rather quickly.  Most of the changes were done in an intuitive and consistent way to help to find new and old features where they belong.  Most configuration files are still the same and those where changes were inevitable are automatically converted as far as possible upon first start.

In some areas (like REXX commands and command line options) we made some changes to maintain a consistent style with other features, but we left the old names intact for backward compatibility.  However, for future projects we recommend to use the new names.

New Features Here are some new features which we think are worth to explore right away: Multiple window/instance support (Host Directory, Edit, Window), Linux, Sun and SCO emulations (Options, Emulations), simple connection from host directory (Host Directory, Edit, Host).

Options If you are looking for an option or setting that used to be there but seems now gone, please now look at Options, Program Settings. The Program Settings dialog now includes the former Directory, Printer, Files and Phone Book options.  Also a good deal of options from former Options, Session Profile (now Options, Session Profile) has been moved there.

Logging Another area of noticeable change regards logging.  What was formerly called the Capture buffer has now been replaced by the scroll back feature.  Both work in a slightly different way, but should produce the similar results in most cases (in fact we expect scroll back to produce better results in most cases).  However, the old style scroll back window (capture browser) is still available in Options, Program Settings, Scrollback, Editor-Style (see help text there).

Toolbar The toolbar is now more consistent with other windows application. If you ca not get used to the new icons, you can right click the empty space on the toolbar and switch to 'Large Symbols' to get the old symbols back.


Starting ZOC (Command Line Parameters and Environment)

Topics in this section:

o	Command Line Parameters

o	The ZOC.CFG file

o	Working Directory/Network

o	Environment Variables

o	Startup REXX Programs


Command Line Parameters

There are a lot of parameters that can be specified in the command line, in the icon's parameter field or in the ZOC.CFG File.

ZOC [/C] [/CALL:<host name>] [/CONNECT=<device>!<host>] [/DEV:<device>] [/FEELX] [/FBOLD] [/FI:<fontname>] [/FX:<fontname>] [/KEY:<file>] [/MIN] [/MAX] [/NOEXCEPTION] [/NUMLOCK:n] [/O:<options file>] [/PF:<host directory file>] [/POS:<x>,<y>,<width>,<height>] [/Q] [/RESTRICT:n] [/RUN:<scriptfile>] [/RLOGIN:<host>] [/TELNET:<host>] [/SSH:<host>] [/TT:<file>] [/U] [/WD:<workdir>]

/C
OS/2 only: This option specifies that you want ZOC to open the COM port in shared (cooperative) mode. This way other programs can access the COM port together with ZOC (but only if they open it in shared mode as well, which OS/2-MDOS and WINOS2 programs don't).

/CALL
This is a name of a host from the host directory to be called after startup, e.g. ZOC /CALL:CoolServer

/CONNECT=<device>!<host>
This option allows you to connect to an arbitrary host via an arbitrary device from the command line.  The device parameter specifies a device name as listed in ZOC's device dialog, the host parameter is a host name, address or telephone number (depending on the device you are using).  If the device is SSH (Secure Shell), you can specify a username and password in the form <username>:<password>@<host>, eg. ZOC /CONNECT=SSH!joedoe:secret@secure.com. For the RLOGIN device you can use <username>@<host>.

/DEV
You can use this option to tell ZOC to activate a specific device at startup.  Supply the name of the device as shown in Options, Device, eg. ZOC /DEV:TELNET
If necessary, you can append device-parameters (as described in the ZocSetDevParm REXX command) to the device name, separated by an @ character: ZOC "/DEV:SERIAL/MODEM@COM3:57600-8N1|9|350" (please be aware that strings which contain the bar character must be enclosed in quotes).

/FBOLD
Load bold versions of Windows True Type fonts (Windows only).

/FEELX
Some X-Windows like mouse utilities seem to confuse ZOC's text cursor handling, resulting in the fact, that the cursor just disappears.  Setting this option makes ZOC more robust in this regard (the drawback is that the cursor will stay on when the ZOC window is inactive).

/FI
Normally ZOC checks the whole list of fonts to see which fonts it can use.  This might list might include fonts that you do not want to use.  When started with the /FI (Font-Inclusion) option, ZOC will only use fonts, who's names match the name given with /FI, for example if you start ZOC as ZOC "/FI:Courier New", ZOC will only offer the Courier New font in it's font list.  You can select multiple fonts this way.  Important:  You should make sure that at least one of these fonts is available and suitable for use with ZOC, otherwise ZOC will exit with a Panic message.

/FX
The /FX option is similar to /FI, except that ZOC will use all suitable fonts, except the ones listed with /FX, for example  to use all fonts except the Terminal fonts, start ZOC as ZOC /FI:Terminal.

/KEY
This option tells ZOC load another key mapping file at startup, for example  ZOC /KEY:SCAND.ZKY.

/MIN
Start ZOC with the window minimized.

/MAX
Start ZOC with the window maximized.

/NOEXCEPTION
OS/2 only: Suppress the OS/2-exception dialog that appears in case of hard errors (OS/2 version only).

/NUMLOCK:n
You can use this option if you want to start ZOC with the NumLock key set to on (n=1) or off (n=0).

/O
With this option, you can tell ZOC to load an options file at start time (normally OPTIONS\STANDARD.ZOC is used). This can be useful if you have more than one modem and different setups for these. A path should be specified, for example  ZOC /O:OPTIONS\COM2OPTS.ZOC

/PF
This is an alternate name of a host directory to load.  The startup default is PHONEBK.

/POS
The /POS parameter allows to control where and how large the ZOC window will open.  x/y are screen pixels from the upper left corner, width/height are the width and height of the window.  Upon startup, ZOC can modify the width/height values according to the window-options (eg. to snap to the best matching font size).

/Q
This option suppresses the introduction window while loading ZOC (quiet start).

/RESTRICT:n
This option allows you to restrict access to certain parts of ZOC (for example if you use ZOC in an pre customized environment). The number after the option controls which parts are disabled and is the sum of any of the following:

1=no access to options
2=no access to host directory
4=disable main popup menu

/RUN
With this option, you can tell ZOC to process a REXX program or a scriptfile after start. A path should be specified, for example ZOC /RUN:SCRIPT\NIGHTCALL (please also check the /U parameter below).  If the REXX program expects a parameter (accessed as ARG(1) inside the script), you could call it like this: ZOC "/RUN:SCRIPT\DOIT.ZRX HELLO".
Note: This parameter can not be used with other parameters that make an automatic connection (like /TELNET, /CONNECT, ...).  In these cases please just use the /RUN parameter and initiate the connection from within the script via ZocConnect or similar commands.

/RLOGIN:
Same as /CONNECT=RLOGIN!<username>@<host> (see above).

/TELNET
This option tells ZOC to connect to a telnet host right after starting up, eg. ZOC /TELNET:bbs.channel1.com  It is possible to put a space character between the colon and the host name.  This allows to use ZOC as a telnet client in Netscape navigator (supply ZOC /TELNET: as the telnet application in Netscape Navigator's options).

/SSH:
Same as /CONNECT=SSH!<username>:<password>@<host> (see above).

/TT
This option tells ZOC load another character translation table at startup, for example  ZOC /TT:SCAND.ZTR.

/U
This option specifies unattended mode. In unattended mode ZOC opens no requesters (like 'Are you sure') but uses them their default answer. This way the program won't hang if you run it in the middle of the night to fetch your mail and something unforeseen happens.

/WD
This option specifies the working directory.  This is similar to the working directory in the program icon, but by specifying the working directory with this option doesn't require to add the ZOC directory to CONFIG.SYS's LIBPATH (see below).


The ZOC.CFG File

The wealth of command line options can make starting ZOC a tedious thing.  If you want some of the parameters to be always provided, you can create a file named ZOC.CFG with an editor and enter one command line option per line, eg.:

/NUMLOCK:1
/NOEXCEPTION
/RESTRICT:3

The ZOC.CFG file is read from the same directory where ZOC.EXE is stored.  Options mix with options given from the command line, that is, options that have a no value (ie. are not followed by a colon) are set if they are provided from the command line or the ZOC.CFG file.  With options that have values, the command line settings take precedence.


Working Directory/Network

If you specify a working directory (see /WD: command line parameter) other than the directory where ZOC.EXE resides, it is necessary that a subdirectory named OPTIONS exists there.

In this case ZOC loads all user configurable files from the working directory or the OPTIONS subdirectory.  This way ZOC can be run from a write protected network drive or different people can use ZOC on one machine (by using the same EXE file but specify different /WD settings).

However, if you use the Working-Directory setting in the program icon instead of ZOC's /WD: parameter, you will need to add the ZOC directory to the LIBPATH (OS/2) or PATH (Windows 9x) entry in CONFIG.SYS or to the PATH setting in Windows NT/2000.

To run ZOC from a network server, set the working directory in the ZOC icon to the network drive and supply /WD:<local-dir> in the parameter field. Please check LICENSE.DOC for legal restrictions.

Additionally you need to contact EmTec and request a document describing how to store the registration keys on the file server instead of the local machines.

If you want to use a modem on a server, please check the EmTec web site for a link to the modem sharing product Stomper.


Environment Variables

ZOC uses the TZ environment variable to correct the file date transmitted by Zmodem.

Zmodem was developed with Unix in mind, where time stamps (file date/time) are always stored in Greenwich time and where local time is calculated by the dir command.  This way a file always carries the correct local time, even if shipped on disk around the globe.  However, the HPFS file system knows nothing about the time zones which are still part of Zmodem. Most OS/2 or MS-DOS systems emulate the time zone in one way or anothor, mostly by using Eastern Standard Time (5 hours west of Greenwich) as a default; files received from such senders get the correct time when received by ZOC. However, some hosts use other time zones. If you want to adapt your time zone setting to such hosts, you should add the TZ environment variable to your CONFIG.SYS.

To do this use SET TZ=<SSS><N><DDD> where <SSS> is a 3-char standard time code, <N> is the time difference from Greenwich and <DDD> is a 3-char daylight saving time code, for example  use SET TZ=EST5EDT for Eastern Standard Time (which is the default) or TZ=CET2CDT for Central European Time.


Startup REXX Programs

There are two REXX programs that are started when you run ZOC. The first one is SCRIPT\ZOCEVENT.ZRX (it is also executed when ZOC closes) and it is intended to stop or restart a fax program's (for example  FaxWorks') auto receive feature.  See the file SCRIPT\ZOCEVENT.DOC for more details.

The other REXX program is called SCRIPT\STARTUP.ZRX and is run after ZOC has been initialized.  You can use it to call a BBS every time you start ZOC or print startup greetings or things like that.


Screen Elements

The elements of the screen are:

o	Menu

o	Toolbar

o	Custom Button Bar

o	Main Window

o	Local Typing

o	Status line


Menu

The menu lets you select most of the ZOC functions (for a description of the particular functions see Menu Overview).


Toolbar

The toolbar offers icons for most of the functions in ZOC.

You will see a description for each icon, if you move the mouse over it and wait two seconds.

You can Customize the Toolbar from the Options Menu or by clicking with the right mouse button on empty space in the toolbar.


Custom Button Bar

The custom button bar is located beneath the toolbar and offers buttons that can be defined in Button Options of the Options Menu to start REXX programs or send text.

In the button options you can assign labels for the buttons and if you move the mouse to a button and wait a second, the full text (or action code) of the button will be shown.


Main Window

The main window displays the received text.

You can bring up a popup menu by clicking the right mouse over the main window.

You can mark text with the left mousebutton (this is called stream mode).

If you hold the Alt key pressed while marking text, the selection will be made in block mode rather than in stream mode (block mode lets you select arbitrary rectangular areas on the screen, stream mode is line orientated).

If you hold the Ctrl key pressed while doing the selection, the text will be appended to the text that already is in the clipboard rather than overwriting it.

The marked text is copied into the clipboard and can be accessed from the functions Paste, Paste (no line breaks), Paste Quoted, Paste CIS-Quoted, Print and Edit in the Edit Menu and with some key shortcuts.


Local Typing

The Local Typing line is an entry field into which you can enter text.  The text is not sent until you press enter.  This is helpful if you are in an online conference or if you use a remote shell that does not provide command editing and history.

The Local Typing line can be activated from Window Options or by pressing Alt+C or by pressing the Scroll-Lock key (the latter, only if defined accordingly in Terminal Options).

If the cursor is in the Local Typing line, you can discard it by pressing ESC or Scroll-Lock key.  With the line open Alt+C will toggle the cursor between the main window and the Local Typing line.

You can use arrow keys to retrieve the last few lines you typed (this works like the command history in an OS/2 or Windows shell).


Status Line

The status line provides information about and access to some options (if, because of a small font, your ZOC window is not wide enough, some of the information will not be available).

Using the right mouse button in the status line brings up a popup menu that gives access to all options dialogs (OS/2 version only).

Placing the mouse on one of the status line elements (fields or LEDs) for about two seconds will show a short description.

Device Parameters
This button displays the currently set line speed and parameters. Clicking on the field with the left mouse button brings up the Device Options dialog.  There you will be able to select and configure the I/O devices.

Transfer Protocol
This button displays the currently set file transfer protocol. Clicking on the field brings up the Transfer Options dialog where you can select and configure transfer protocols.

Emulation
This button displays the current terminal emulation. Clicking on the button brings up the Emulation Options dialog which will let you choose from the list of available emulations.

Timer
This button displays the timer. The value depends on the currently set mode (see Cost Description and Window Options).
A lowercase letter a-j means that a timer unit is selected and that the timer was stopped. A capital letter indicates that the timer is running. The digit (from 1-6) after the letter indicates that the so numbered description field for that distance zone is currently used.
A click on the button brings up the Timer Options dialog.

LEDs
The four LEDs in the status line provide two services:
If they turn green, your host has requested the VT102 LED service and sets the LEDs according to the application you run. The LEDs will stay green until you change the emulation or clear the screen from the View Menu.
If they are red they display additional status information:

LED 1
ON: Modem Carrier Detect
OFF: No Carrier.

LED 2
Bright Red: Script running.
Blue: Doorway mode active.
Pink: Autologin running.
Green: Learning REXX or AutoLogin.

LED 3/4
Modem receive-data and send-data. They can be turned off in the Window Options.

Logfile
This checkmark displays the name of the logfile and opens or closes it.

Online Time
This shows how long you are (or have been) connected to a host.

Window Size
This shows the size of the window (columns x rows).


Menu Commands

The menu provides some submenus which give you access to ZOC's functions:

o	File Menu

o	Edit Menu

o	View Menu

o	Logging Menu

o	Transfer Menu

o	Script Menu

o	Options Menu


File Menu

The file menu manages all necessary functions to maintain the communication devices (Modem, Telnet or ISDN, etc.) and to connect to a host. Additionally, selected host directory entries can be dialed directly from this menu.

Additionally some device dependent function may appear in this menu (like Telnet's :EXMPL(Are you there).). They are described in the device's help text as well).

Quick Connection
This function opens a window to enter a phone number or a connection address.  ZOC will then try to connect to the destination. In case of the Serial/Modme device it will use the dial string (see Modem Options) you specify in the window as well. If the host is busy or cannot be reached for any reason, ZOC will reconnect it using the options specified in the Host Directory Options.

Disconnect
Disconnects the current connection.  If you are using the Serial/Modem device, the hangup method defined in Modem Options will be used.

Send Break
Pulls the data pin of the modem low for a given time (see Modem Options).  This is called 'sending a break'.  Some systems use this to stop the current operation. Devices other than the modem will perform a similar operation or will just ignore this command.

Initialize
This function will reset the communication device to it's default state. For modems this means that the init string defined in the Modem Options will be sent to the modem to set it to a defined state. It will do this regardless of the current carrier detect state.

Device Dependent Functions
The device dependent functions are described in the input/output devices section of the help file.

Accept Connections
This function enables/disables the auto answer mode of your communication device.  The telnet device will create an incoming port with port number 23.  The Serial/Modem device will send the commands you set up in Modem Options.

In auto answer mode the modem will automatically pick up the phone when the phone rings and will try to establish a data connection with the calling modem (of course this is not a good idea when you expect voice calls).

Host Directory
The host directory is a dialog to maintain your personal dialing directory or to connect to one or more numbers from it (see Host Directory).

Call Next
If you select more than one host to call from the host directory, ZOC will connect to the first of them that is available.  After finishing the call you can select this function to try to reach the next available host.

Stop AutoLogin
This function aborts automatic login initiated from a host directory entry (see Changing Host Directory Entries).  AutoLogins are indicated by the 2nd LED in the status line being pink.

Call XXXX
At the end of the file menu appear those entries from the host directory that have the Menu Access option enabled (see Changing Host Directory Entries). This is handy for hosts which you call often.


Edit Menu

The edit menu allows you to access your computers's clipboard.  Normally it is copied from a ZOC screen by marking characters with the left mouse button (this can be combined with the Alt key), but it can be copied or cut from an editor or any other program as well.

See also: Options, Program Settings, Clipboard

Mark
This function is just an info message of how to put text from screen into the clipboard.

Copy Window
This function copies the entire contents of the ZOC text window into the clipboard.

Paste
This function takes text from the clipboard and sends it to the host. The sending is done like an ascii upload and the delay and CR/LF translation from Ascii Upload Options are used.

Paste (no line breaks)
Takes text from the clipboard and sends it to the host.  Carriage Returns are ignored and a Space is sent instead.  This function is affected by the Ascii Options in the Transfer Options window.
Imagine the following case: You searched a host for files with the keyword TERM and the host gave you a list of filenames - one in each line. To download all files, you could mark the list with a box (left mouse button while pressing the Alt key) and send them with a space between them when the host asks for the filenames to download.

Paste Quoted
Text from the clipboard is sent.  Each line is preceded by > to indicate a quotation.  If you press the shift key while selecting this function, ZOC will reformat the text to fit into the line before sending it.  The function is also available from the Toolbar and is affected by the Ascii Upload Options in the Transfer Options window and 'Quote always smart' in the Terminal Options window.

Note: If you hold the shift key pressed while selecting this function, the text will be reformatted to fit a given width.

Paste CIS-quoted
The quoting style of the Send Quoted function is used widely across the networks.  However, on CompuServe most people quote text by starting the quotation with >> and ending it with <<.
This function works the same as Send Quoted but uses the CompuServe quotation style.

Note: If you hold the shift key pressed while selecting this function, the text will be reformatted to fit a given width.

Edit Clipboard
Calls the system editor (see Directory Options) with the contents of the clipboard.  After saving, the new contents is written back into the clipboard.

Print Clipboard
Sends the contents of the clipboard to the printer (the printer port is defined in Directory Options).

Lock Macros
Lock the macro keys to prevent unauthorized use (see Safety Options).

Unlock Macros
Unlock the macro keys again.  If defined, the password from Safety Options is required.

Reset Timer
Reset the timer in the status line which displays the time or cost of your current call.

Hold Timer
Stop the timer in the status line which displays the time or cost of your current call.

Release Timer
Restart the timer in the status line which displays the time or cost of your current call.

Set Timer
Set the timer to a specific value.


View Menu

In the View menu you will find functions that have to do with screen display etc.

Probably the most used function will be the Scroll Back buffer.  It is a memory buffer that stores the lines that scrolled off the top edge of the screen.  A similar function is the Stream Capture: it captures data exactly in the order it was received (which may look quite messy for applications that use on screen menus, etc. but can be useful for logging commands in Unix shells etc.).

See also: Logging to File functions

Scrollback
This function shows the contents of the scrollback buffer inside the main window to see text that has scrolled off the screen.

Scrollback as Window
Alternately to scrolling back inside the main window, it is possible to open a scrollback in a separate window, thus being able to see current and scrolled text at the same time. The font for the window is selected in Options, Program Settings, Scrollback

Clear Scrollback
Clears the capture buffer. This function is affected by the Safety Options.

Clear Screen
This functions just clears the terminal screen and resets the LEDs in the Status Line back to red.

Print Screen
This function lets you print the contents of the terminal window (in raw ASCII mode).

Save Screen
Saves the contents of the terminal window to the file defined in Program Options, Files.  If the file already exists, the text will be appended.

Editor
Call the editor defined in the Directory Options.

Command Shell
Call the shell defined in the Directory Options.

Snippets
ZOC monitors your input data stream for filenames, fido node numbers, CompuServe user IDs and Internet addresses and collects them in a little window that floats aside the ZOC window.   Using this function you can show or hide the Snippets Window.  When it is showing, you can send one of the collected items by double clicking it with the mouse.

Note: This feature needs a bit of CPU power, so if you don't need it or don't have fast machine you should disable it in the Window Options.  A good compromise is to hide the window most of the time (thus monitoring the input stream but saving the CPU power to update the window) and to show it (using the Alt+. key combination) when it is needed.

Note: Under OS/2 you can change the font of the Snippets window by dragging a font from the System->Setup->Fonts folder of the desktop and dropping it above the Snippets window.

Window Elements
This shows a submenu in which you can check the window elements for ZOC's main window.  This is the same as the window elements box in the window page of the options dialog).

Local Typing
This function shows an entry field on screen where you can type locally before sending the whole line to the remote host (local typing uses the ASCII send options in the Session Profile, transfer-2).  You can jump between the main screen and the Local Typing window via Alt+C and you can close the Local Typing window via ESC.

Split Chat
The split chat function splits the screen horizontally and shows text you type in the lower half while displaying text you receive in the upper. This is handy if you want to chat with someone who called you by modem directly.

Note: You should not use this function while accessing a remote host.


Logging Menu

ZOC maintains multiple different logging methods. There are two memory logging mechanisms which are found in the View Menu The log menu itself features permanent logging functions, i.e. logging to disk file and printer.

The so called Logfile that logs all incoming data permanently to a file on the hard disk.  The other is redirecting all incoming data directly to the printer.  The last one, the call log, logs time, duration, cost and file transfers of your calls to a file (see Call Log).

The Logging Menu controls the capture, logfile and printer logging.

Log to file
This function changes the toggles the status of logging between on and off.  This can also be achieved by clicking on the capture name in the Status Line and can be done remotely if your host supports the DC2/DC4 logging protocol (see Logging Options).

Log to printer
Sometimes it is handy to have part of a session sent to the printer. This is possible by enabling this function before receiving the data (e.g. before reading a mail).
Additionally it is possible to print already received text, by opening the capture window (see Logging Menu), marking the text with the mouse (to copy it to the clipboard). and printing the contents of the clipboard from the Edit Menu.

Set Log Name
Set the name of the current logfile. The name can be automatically selected from the host directory when connecting to a host (when starting ZOC the logfile gets its name from Logging Options). You may use special placeholders for the name as described in the Logging Options and the Code Section of the appendix.

Default Log Name
This sets the logfile to the file defined in Logging Options.

Delete Log Files
Since you can build log file names that contain the current date you might end up with a lot of log files. Using this function lets you delete logfiles you do not need any more.   Selecting this function will open a file requester in which you can select one or more files which will be deleted if you press OK.


Transfer Menu

The transfer menu allows you to send files to the host or receive them from it.  The functions in this menu use settings from Options, Session Profile, Transfer and Options, Program Settings, Directories

To transfer files over SSH connections, please see the description for the Secure Shell (SSH) Device.

Upload
Sending a file to a host is called an Upload.  To do this the sender and receiver use certain methods called Transfer Protocols.  The upload function sends a file to the host using the currently active protocol (see Transfer Options).

Download
Receiving a binary file from a host is called a Download.  The same transfer protocols are used as for uploads.  Downloads are affected by the Transfer Options.

Send Text File
This functions takes text from a file and sends it to the host without using a file transfer protocol.  Roughly spoken, an ascii upload is the same as typing text very fast.  This way you can prepare messages using an editor before you call a host and then send the file with this function when the host asks you to type your message.

Note: If the host loses characters in this process or if the transfer is too slow, you can modify a delay for each character in Options, Session Profile, Transfer-2 Options window.

Send Binary File
The Send Binary function is very similar to the Send Text File function. The only difference is that the data in the file is not translated in any form and that the host is not expected to echo the characters back to ZOC. This function uses the character delay from Send Text, but ignores the line delay (see also: Options, Session Profile, Transfer-2).


Script Menu

Start Script
Starts a REXX script.  REXX is something like a batch programs for ZOC, which lets you process specific tasks automatically (see ZOC Automation).

Stop Script
Stops a currently running REXX script.

Encrypt Script
Encryts a script file in a way that it can not be read by users while still being executeable by ZOC.  This is useful if you are distributing scripts to customers.  (Please be aware this is just a lightweight encryption method that can be reversed by an averagely talented hacker)

Edit Script
Call the editor to modify a REXX script manually.

Record Script
Most of the time REXX is used automate logins.  Writing these is a rather tedious and boring task that can, for the most part, be done automatically.  If you select this function before calling a host, ZOC will monitor the login process and create a REXX program that handles the login automatically.

Note: The program will only contain the code necessary for the log in.  It will not contain commands to call that host (which is normally done from the host directory and not from script).

Stop Recording
After you enabled script learning and logged into a host you tell ZOC to stop the learning process.  ZOC will ask you for a name and store the script accordingly.  The name you use can later be entered into the REXX field of a host directory entry (see Changing Host Directory Entries).  Then ZOC will execute it to log you in after having established a connection to that host.


Options Overview

The options menu is used to define the characteristics of ZOC. There are basically two kinds of options: global program settings and variable settings (profiles).

Program Settings
Options which remain the same for all the hosts you call, e.g. directory settings, handling of connections, etc.

Session Profile
Options which may vary from host to host, e.g. communication method, terminal emulation, etc.

Keyboard/Character Translation Profiles
Profiles which are stored independent of the session profile and which can be loaded or attached to host directory entries.

Usually the profiles are selected in the host directory entries Options tab or loaded from modified desktop icons via command line parameters. Profiles named Standard are automatically loaded at ZOC startup.

See also: Options Menu


Options Menu

See also: Options Overview

Program Settings
Configure the Program Settings which are likely to remain the same for all your connections.

Session Profile
Configure session related settings (see Session Profile).

Jump to
Display a submenu to jump to a specific page session profile dialog.

Load Options
Load a file of session profile.

Save Options
Save the current session profile to disk.

Save As
Save session profile to a file with different name.  If saved as STANDARD.ZOC, it will be loaded automatically when ZOC is started.

Reset Options
Reset the current session profile set to the default state.

Manage Keymaps
Brings up the keyboard redefinition dialog which will let you load, modify and save keyboard profiles.

Manage Translation
Brings up the character translation dialog which will let you load, modify and save character translation tables.


Quick Connection

The quick connection dialog lets you make a connection to a remote host without adding it to the Host Directory.

This is useful if you want to connect to a host only once.  For hosts, to which you connect more often, you should add an entry to the Host Directory from the File menu.  Connections to hosts from the host directory can be made from the list at the bottom of the file menu (adding them here can be selected in the host directory entry) or from user buttons (Options, Session Profile) or by remapping keys (Options, Keymap).  Hosts from the host directory can also log you in automatically or perform automatic tasks by starting REXX Skripts after the connection was made.

For quick connections you can select a communication device, the host to call, an optional port number (for Telnet, Rlogin and SSH connections), an emulation and your login data (for SSH and Rlogin connections).

Connect to
Depending on the communication method, you can enter a host name or IP address,  a phone number or whatever identifies the remote host. If the Telnet, Rlogin or SSH device is selected (see below) you will also be able to enter an ip port (e.g. 110 to connect to a pop3 server or a custom port number if your host requires it).  This field offers a list of recently made connections.  If you want to reconnect to a host to which you recently made a connection, simply pick the host from the drop down list.

Device
The device list offers a list of communication methods which can be used to make the connection.  (Note: Most devices offer a range of device specific configuration options.  These can be configured in Session Profile, Device from the Options menu).

Emulation
Here you select a terminal emulation which will be used to let the host display data in the terminal area of ZOC.  The emulation will depend on your remote host.  For connections to Linux or Unix hosts the Linux or VT220 emulation will be a good choice.  Most BBSs however will work with the ANSI-BBS emulation.  Emulation specific settings can be configured in Session Profile, Emulation from the Options menu.

Username
The SSH and Rlogin device will offer a field to enter your username. This will be used to identify you on the remote host.  If you do not enter a username here, you will be prompted for one at login time.

Password
The SSH device will also offer a field to enter your password. The password is usually required together with your username and you will be prompted for one if you do not enter it here.

SSH Authorization File
When making SSH connections, some hosts require files with public and private keys rather than using a username/password pair for identification.  You can either pick an individual file from the SSH directory (configured in Options, Program Settings, Directories) or use the global SSH authentification file, which is configured when selecting Secure Shell/SSH from Options, Session Profile, Device
Note:Individual files can be created through the Manage SSH Keys function from the File menu or from Options, Session Profile, Device, Secure Shell.


Host Directory

The host directory can be accessed from the File menu and acts as a personal host directory for hosts or phone numbers to connect to.

It is subdivided into four sections (default, 1st, 2nd and 3rd alternate) which means, that you practically have four different host directorys which can be indivitually named in the Host Directory Options dialog from the Options button in the main window or from the Options, Program Settings menu item.

The main window lets you select one or more hosts to call and gives you functions like Delete or Edit that are necessary to maintain the list.

In the host directory list, entries which are defined to be called regularly are marked with a checkmark if they were called recently; if they are marked with a yellow flash they are due for calling.

Connect
Connects to one or more selected entries. If you select more than one entry (to do this, hold the Ctrl key pressed while you click on one entry after the other with the mouse) ZOC will connect to the first that is available and store the others in an internal dial queue so you can call them later (using the Call Next operation from the File Menu).

Edit
Changes the data of the selected entry (check Changing a Host Directory Entry for details).

New
Creates and edit a new entry in this section of the host directory.

Clone
Creates and copy of the selected entry and opens the edit window.

Delete
Deletes one or more entries from host directory.

Print
Prints the selected entries.

Due
Selects all entries which are due for calling (marked with a little yellow flash in front of the phone number). ZOC determines the entries that are due for calling by looking at the date of the last call and the 'Call after xx days' field from the edit window.

Import
Imports host directorys from other comm programs.

Options
Show the host directory options (this is the same as calling the host directory options from the options menu). See Host Directory Options.


Changing a Host Directory Entry

Each entry consist of the following settings

o	Host

o	Options

o	Login

o	BBS

o	Info

o	Window


Host

Name
A name for the entry. For multi port hosts, you should use names that are equal in the first six characters (e.g. AVALON-1, AVALON-2 ...). ZOC will maintain call dates, call counter etc. for all ports of the host instead of updating only the one that was called.

Section
Select the host directory section to store this entry to.  The sections can be individually named in Host Directory Options.

Sort first
The host directory is sorted according to the Host Directory Options but you might have entries that you want on top of the list regardless of their name, last call or whatever it is you use to sort the list. This option will send the entry to the top of the list.

Connect to
The phone number of the host or, if you are making a non-modem connection, a string (e.g. an internet address and port number) that represents the service you want to call.  You can use one or more of the host directory macros in this field to make calling more flexible (see Host Directory Options).

Device
This field lets you specify a device (and related device-settings) to be used to make the call.  The device settings window will vary with the devices you use.  If you select "<DEFAULT>", the host directory entry will use the device that is currently active, or that is active after the options file (see below) was loaded (if one was loaded).

Device-Options
If you select a device other than "<DEFAULT>", you will be able to configure that device, eg. you can set different TELNET options for different hosts in the internet.

Dial Command
If you are using the Serial/Modem device, you can select a dial command (from the Modem Options) to be used to dial the phone number.

Make Connection via ...
Here you choose if you want to use the AutoConnect feature that shows a connect dialog and tries to reconnect if the connection fails or if you simply want to connect without an extra window and without retrying.

Menu access
Select this if you want the host to be accessible from the file menu. Insert a tilde before a character in the name (e.g. ~ZOC InfoBBS), to create a shortcut for the menu item.

Key Shortcut
It is also possible to define a Ctrl+F-Key (e.g. Ctrl+F6) combination that can be used to connect to this host.


Options

Options file
Select the name of an options file to be loaded (e.g. COMPUSRV.ZOC) before the host directory entry is called.
This way you can have entirely different options for different hosts. New options files can be created with the Save-As command in the Options menu.
After the file was loaded, the device, emulation and file transfer protocol will be set (see below).
If the host directory entry does not rely on settings in an external options file, you can select "<DEFAULT>" which means that the host directory entry will be called with whatever options are set when you connect.  The options listed below (translation, keyboard etc.) will be set anyway.

Translation
Select a character translation table (created from the Options, Translation dialog) to be used when calling the host.

Keyboard
Select a key map (created from the Options, Keymap dialog) to be used when calling the host.

Emulation
Select an emulation to use after loading the options file but before calling the host.

Protocol
Select a protocol to set after loading the options file but before calling the host.

Cost
If you set up the Phone Cost Description you can specify the distance zone to be used to calculate the phone cost for calls to this host.

Logfile
This is a name to be used for logging the session. Special placeholders (for date or time) can be used as described in Logging Options.

Download/Upload Path
This is the name into which downloaded files are stored (or uploaded files are taken from) while you are online from this host directory entry.


Login

Username
Here you can set a username for login at your host (however, this field is only used if you are using the Secure Shell, Rlogin device or if you enable the IEMSI option). You can also access the username by mapping ^% to a button or function macro key (this is described with the password field below).

Password
You can add a password for the host here, which will be used by the Secure Shell device and IEMSI. Also, if you connect to the host you can send the password by defining a macro key as ^& (or by sending ^& from a REXX script).
That is, if your F12 key is set to the text ^&, you can answer the password prompt of the host by pressing F12 (see Macro Keys).
However, it is more convenient to let the AutoLogin feature (see below) handle the entire login.
The password field will not show the entered password.  If you find that unnecessary, you can make it readable in the host directory options dialog.
The password can be used only once per session to avoid giving it away by acidentally pressing the wrong F-key or user button in an online chat.

AutoLogin
This field contains a sequence of events (either wait (W) or send (S) events) that logs you into the host automatically. Since most logins can be handled in a form like 'wait for this, then send that' ZOC offers a method to do exactly this without having to deal with REXX programming.
To send special keys like Enter or ESC you can use control codes as described in the Appendix.

S0=...
If defined, S0 is sent unconditionally after a carrier signal was detected. It can be used to raise the attention of the host.

Wn/Sn=...
Define pairs of words to wait for and to reply then. Text to wait for is listed as W1, W2 ..., the corresponding text to be sent is given as S1, S2 ... (see example below).

Note:  the W and S characters must not be lowercase letters

Example:
W1=Esc|S1=^[|W2=Name|S2=Zaphod^M|W3=Password|S3=HeartOfGold^M This example means: To log in, first wait until the host sends the characters Esc, then send the ESC character to the host. After that wait until the host sends Name, and send Zaphod<Enter> back. Then wait for the text Password and send the text HeartOfGold<Enter>.

Note: You don't have to write such AutoLogin sequences yourself, since you can tell ZOC to learn it by watching you the next time you call this host.

-

REXX Program
The name of a REXX file to be executed after the dialer has made a connection to the given phone number (for REXX programs the argument will be supplied in ARG(1)).
Such a script could be used to log you into the host automatically. However, for simple login procedures (like sending user name and password), the AutoLogin feature or IEMSI (both described below) are more handy.


BBS

Call every XX days
If ZOC finds a carrier detect signal after calling a host, it will update the date of last call for the called entries (and all others that are equal to the one that was called in the first six characters of the name, thus managing multi-line hosts correctly, see Name-field above).
If you want to call a host regularly (say once a week) you can enter the number of days here after which ZOC should remind you (by showing a symbol in front of the phone number in the main window) that it is time to call that host again.

Group call
If you call hosts that have multiple phone numbers you should create one entry for each phone number and name them in a way that the first six characters of the entries are the same (see above).
If you don't want to select all these entries to call that host you should enable the group call option for one (or all) of them. This way ZOC tries the other lines as well to connect to the host.

IEMSI options
Many bulletin board systems offer a method called IEMSI to automate the login procedure.
Using this method you can provide your name in the IEMSI options window and set the password field to the password you use to log into that host. Additionally you can specify some options that are used by host.
During the login the host will send the IEMSI request (**IEMSI_IRQ; not to be mixed up with the **EMSI_REQ that is used for FIDO mailer software) to which ZOC responds by sending your user name and password to the host. If everything goes well, the host will let you in at once and show (or skip) news, new mail and new files as selected in the IEMSI options window.
If you leave the name field empty, ZOC will use the name supplied in the Modem Options.

Note: This button is only available if you entered a password for this host.


Info

Memo
This first line of the memo stores a short note about the host. You might want to enter the name of the sysop or other info about the host here (for passwords you should use the AutoLogin feature or the password field).
If this field is not empty, it will be displayed in the host directory main window. If you don't like this, begin the memo with a space character; in this case, the main window will still show the number of calls instead of the memo.
The other fields are maintained by ZOC and cannot be modified.


Window

The Window settings for each host control if the host is called in it's own terminal window or if the existing window should be used.

If a new window is selected, you can control the position where on screen the new window should be opened.  The position is given in screen pixels and there is a button to take the value of the current window.  However, when opening the new window, the width and height of the window may vary due to the current font and window settings.


The AutoConnect Feature

When you selected one or more entries from the host directory or choose Quick Connection from the File Menu the AutoConnect window will pop up. It will try to connect you successfully to the number(s) you selected. If a number is busy it will try the next in the list (if more than one was selected) or retry the number. To do that, AutoConnect will use the values you set in Host Directory Options to define the maximum number of retries and the time between attempts to call the same number (see note about retry delay in Host Directory Options).
During AutoConnect you can control the operation using four buttons:

Cancel
Abort calling.

Retry Now
If AutoConnect waits to call the next number you can skip the delay and retry at once.

Skip This
This function skips the call to a number and proceeds with the next in the list. The skipped number will be called later.

Drop This
This function cancels the attempt to call a number and proceeds with the next in the list.  The cancelled number will be removed from the connection list.

A special feature is that the window switches between a small and a large version if you click on the minimize/maximize button in the upper right corner of the window.


Importing other Host Directorys

ZOC is able to read and convert host directorys of a few popuplar comm packages (like Telix for DOS and Windows, Telemate for DOS and Windows, etc.). To do this, select the type of host directory, the section of the ZOC host directory to which you want to import the entries and the file to import.  Then press the OK button.
If you like to develop a converter for another program, please contact EmTec for details.  Speaking of this, I'd like to thank Siegfried Bauer for rewriting and improving the Telix/Win converter.


Other Functions

o	Browse Window

o	File Transfer Window

o	File Transfer Game


Browse Window

The browse window lets you scroll back through the text you received since starting ZOC (or since clearing the capture buffer).

You can mark text with the mouse (thus putting it into the clipboard) or search for text by pressing the F(ind) key.


File Transfer Window

The transfer window consists of the following parts:

Name
The name of the file to be transferred (not available in Xmodem downloads).

Size
The size of the file to be transferred (not available in Xmodem downloads).

Transmitted
The number of bytes sent or received so far (the net value without control bytes like checksum).

Time
The duration of the transfer so far and the projected time to go (only available if the file size is available).

Speed
The avarage net number of characters sent or received so far. This should be about a tenth of the connect speed (e.g. 960 cps at 9600 bps).

Skip
This button is available in Zmodem only and skips the current file.

Note: The skip option might not work with all Zmodem implementations.

Game
During large file transfers you might find the time to play a little game

Disconnect after transfer
If set, ZOC will disconnect from the remote host after the file transfer

Note: Please be careful, ZOC will not properly logoff from your host, but it will merely hangup instead. Not all hosts (or sysops) like this.

Delete file after transfer
This checkmark makes ZOC delete the file after the transfer. Files are only deleted if they were transferred without error and file transfer was not aborted by the user.


File Transfer Game

Finding out how the game works is part of the fun, therefore only so much shall be revealed:

o	Use the right and the left mouse buttons

o	The more fields you vaporize in one move the higher your score

o	Plan your moves carefully


MINIHOST

Together with ZOC comes a MINIHOST program (implemented in ZOC's REXX script language).  It offers a simple file exchange host.  A typical use for it could be leaving it running on your home machine while you are away to the office, to make sure that you can download files from the home machine during the day if the need arises.  Or you could use it to allow a friend to upload a report for review or whatever. Of course, the host program leaves much open (things like leaving messages etc.) but is partly designed as a complex example for REXX programming and partly as a point to start your own development. In any case, if you want to run a full fledged BBS it is highly recommended that you use a real BBS program.

By default, MINIHOST can be started from the user button bar, but you can also start MINIHOST.ZRX via Start-Script function from the Script menu. The program will come up with the question if you want to test it locally or not (ie. if you want to offer a connection via modem).  Then it waits for a connection and asks for username and password.  ADMIN/SECRET and GUEST/GUEST are predefined values.

To allow other users access to your machine, you must edit the MINIHOST.ZRX file (use Edit-Script from the Script menu) and modify the user entries in the upper part of the program.  For each user you can select a username, a password, a home directory and a mode.  Mode 0 restricts access to the assigned home directory (which you need to create) on the drive that is defined on top of the userlist, while mode 1 allows access to all disks.


Customizing ZOC

Besides the ZOC.CFG file there are basically three sets of options: Program Options, Misc. Program Options and Session Options.

Program options hardly change once you defined them, while it is very likely that the options from session options will differ between different hosts you use.  Therefore there is only one set of global options but you can have as many session profiles (containing the other options) as you like.

See also: Options Overview


Program Settings

Program options (as opposed to the options from the Session Options) are valid for all connections you make.  They contain options that, once they are set, hardly change at all.

Program options are

o	AutoConnect

o	Clipboard

o	Confirmation

o	Device Responses

o	Disconnect Action

o	Directories

o	Scrollback

o	Host Directory Dialog

o	Protection

o	Printer/Sounds

o	Special Files

o	Miscellaneous

o	Window


AutoConnect

The AutoConnect function is used when you select the connect function from the Host Directory or from the File Menu. It tries to connect you to a given host and retries several times if it fails to make a connection.  You can specify the maximum number of retries and the time between trials of the same number.  If, for example, you set the time between attempts to 10 seconds and select three entries from the host directory to be called, and if the call to all of them fails, the first one will be called immediately after the third since trying the second and the third will very likely need more 10 seconds.

Some countries require some time to pass before the next number can be dialed.  So ZOC lets you define the minimum time between tries to call any number.

Additionally you can define a string to be used as a prefix for calls via Modem/Serial or ISDN device.  This is useful if you have to dial 0 or 9 to get a dial tone.  If you need the prefix only for the Modem/Serial device, you can use the modem dial commands (see Modem Options) or the phone number macros (see below) for this purpose.

Small AutoConnect window

You can choose between a large and a small window that shows the progress and details while calling.  The large window (naturally) covers more screen while the smaller one might not fully display long messages or phone numbers (which is just a cosmetic problem).

Note: You can switch between the larger and the smaller window while calling by clicking the minimize/maximize buttons in the upper right corner of the AutoConnect window.

DIAL-MACROS

The host directory offers four special macros for use with telephone numbers. When you use the strings $1, $2, $3 or $4 somewhere in a telephone number (or other device's equivalent) ZOC replaces the string with the text defined in the Macros dialog.

E.g. if you are using calling card numbers for some entries in your host directory, you could define $1 as 1234 5678 9012 3456 and insert $1 into your phone number whereever the calling card number should appear.

Note: These macros are strictly for use with telephone numbers in the phone book.  They do not work if you use them in modem strings, function keys, etc.

Note: In many cases similar results can be achieved by the use of different dialing strings (see Modem Options).


Clipboard

Paste without final newline
Checking this option will keep the cursor in the line where the pasted or quoted text ends (normally it will skip to the next).

Disable immediate sending of one character clicks
Normally ZOC sends characters to the host, when you click them with the mouse (which can be useful for menu driven hosts).  This option disables the click-send feature.

Paste single-line slections immediately
Selecting this option will always send marked text at once if only one line is marked on the screen.  Otherwise the text will be sent at once, if you hold the Shift key pressed while doing a one-line selection.

Paste using right mouse button
This options enables a feature that does a clipbard paste when you right click ZOC's main window.

Width of quoted pastings
Reformatting for smart quoting will be done in a way that no line is longer than the number of characters specified here.

Always reformat
If selected, the Send-Quoted function from the Edit Menu will always try to reformat the text before sending it.  When disabled, reformatting is still available by holding the shift key pressed.

Indent quoting
If this option is checked, quoted texts will be indented by one space (eg. to prevent CompuServe from reformatting the text).  This option is ignored when quoting in CompuServe-style.


Confirmation

Define if you want to be warned before performing "dangerous" operations or if you want to protect the setting of the macro keys and custom buttons.

Confirm ...
This should be self explanatory.

Warning if high-speed without RTS/CTS
The RTS/CTS handshaking method provides reliable control of the data flow between the PC and the modem.  If you use high transfer speeds without RTS/CTS handshake you will very likely encounter transmission errors. Enabling this option gives you a warning if you select more than 4800 baud without selecting RTS/CTS as well.


Device Responses

Here you provide ZOC with the responses the modem (or other devices) send when making or failing to make a connection.

These are used by ZOC to determine if a connection was made, if ZOC shall redial or drop a called host directory entry or if the dialing shall be aborted at all (e.g. because of an incoming call).

The modem responses have to be separated by a vertical bar (|) without space characters like CARRIER|CONNECT.


Disconnect Action

Clear Screen
This options will tell ZOC to clear the screen and reset the screen colors after you disconnected.

Show Host Directory
If this option is enabled, ZOC will show host directory after you disconnected from an online service (but only if there are no more entries left in the call queue).

Load standard options
If this option is enabled (which is recommended) ZOC loads the default option set after you disconnect from a host session. This way you will have the standard options always active, even after calling a host that uses unusual options (e.g. a slow transfer speed).

Do not ask to call next
If you disconnect from a service (and if there is still an item in the call queue), ZOC can either try to connect to the next service automatically or after promting you if you want it to.

End Program
This option automatically closes the ZOC window when a connection is terminates.


Directories

Download
The directory where downloaded files will normally be stored.

Alt Download
This field defines a directory into which special files are downloaded. The file extensions of the files to be put into this directory are defined in the transfer section of the options dialog. This directory is mostly used to redirect special mail types to a different directory (e.g. KWQ mail packets.)

Upload
The directory from which uploaded files are taken if no explicit path is supplied in the file name.

Text Upload
The directory from which the Transfer, Send Text File function takes the files.

Logging
The Logging, Log-File feature stores the logs here.

Logging MB max
If this value is greater than zero, upon exiting the program, ZOC checks the amount of data in the Capture Path and issues a warning if it exceeds the maximum value set here.

Scripts
The directory where REXX files are searched by default and where the several REXX file requesters start.

Options
The directory where the ZOC session profiles and other options files are stored.


Miscellaneous

Save options at end of program
Here you can select if you want to save options automatically when you leave the program.

No easter eggs
On some days ZOC welcomes you with a special message (mostly related to holidays).  If you think that this is inappropriate, please disable the greetings with this messagge.


Host Directory Dialog

Multiple selection without Ctrl key
Normally you have to hold the control key down to select several non contiguous entries from the list (which is the way how it is done across the OS/2 Workplace Shell and Windows).  This options changes that behaviour so that you can select multiple entries by just clicking on them.

Multi-Line-BBS Significance
ZOC is able to handle Multi-Line-BBSs if the multiple lines have entries in the host directory which's names are equal in the first six characters (default).  With this option you can turn this feature on or off or increase or decrease the number of characters after which ZOC will treat host directory entries as belonging to the same host.

Password field unreadable
Here you can decide if the password field is readable or unreadable (when editing host directory entries).

Sort order
Select a sort criteria to control the order in which the hosts are presented in the main window of the host directory.

Font for List
Here you can select a font for the list of hosts in the host directory. Enter the font selection in the form <font size>.<font name> and do not add space characters between the size and the name.
Examples: 10.Helv, 8.Fancy Font, 12.Chinese

Sections
You can define your own names for the four sections of the host directory.


Scrollback

Scrollback Viewer
Under this group of options you can specify the maximum number of lines which the program stores for scrolling back.  (Very large numbers may consume a lot of memory.)
From ZOC's menu you can either scroll back within ZOC's main window (Shift+PageUp) or within an extra window (Alt+PageUp).

Stream Capture
The Stream Capture logs incoming data exactly in the order it is received to a memory buffer and has a viewer that allows to display the data in a way, that lines that wrapped around the right border of the screen can be unwrapped.  This can be useful when displaying results on Unix systems (e.g. a 'cat' on a logfile).  The size of this buffer can be configured in this dialog.

 See also: View Menu


Protection

Safety for...
Here you can select various parts of the program that are likely to contain confidential information and which should be protected by a password.

Password
The password is case sensitive. However, all this is far from industrial strength protection. It just gives you protection against casual attempts to gain access to your data (eg. when using ZOC on a computer fair)


Printer/Sounds

Printer
Here you can either select an installed printer or printer port (e.g. LPT1) to which output is sent when you use one of the printing functions. Under Windows it is also possible to select the Windows default printer.
If you are printing from a remote application (via vt100/220) the appropriate printer depends on the application.  If the application simply sends text and no printer control codes, you can either select an LPT port or any printer that is installed in your system.  However, if your application sends printer control codes (requires transparent printing) you either need to select a printer port (LPTx) or you need to install the 'Generic/Text only' printer driver (Windows only) to make sure that all of the applications printer controls reach their destination.

Sounds
These are sounds to be played to indicate certain events (under OS/2 the multimedia kit must be installed for this). File names should be entered with full path.


Special Files

Editor
This defines the editor to be used when calling the Edit Clipboard function from the Edit menu, or when calling the Edit function from the View menu.

Note: If you set this field to the string "<DEFAULT>" (without the quotes) ZOC will use E.EXE (for OS/2) or NOTEPAD.EXE (for Windows).

Shell
Shell defines a shell to be opened, when calling the Command Shell function in the View or Transfer menu. This shell is also called with the /C parameter if you issue a SHELL command from within a ZOC script.

Note: If you set this field to "<DEFAULT>" (without the quotes) ZOC will use CMD.EXE (for OS/2 and Windows NT) or COMMAND.COM (for Windows 9x).

Call Log
This file is a file to which ZOC logs calls to BBSs (C+/C- means connect/disconnect) and file transfers (DL means download, UL means upload). However, the call log is maintained only, if you have 'Valid CD signal' enabled (see Device Options).  If no path is specified, the call log is stored in the working directory.

Save Screen
This field defines the name of the file, into which the Misc, Save-Screen function will save the contents of the terminal window.

ZOC Event
The File selected here will be called when ZOC is started, when it terminates and when a device is changed.  You'll find the technical details in the sample file ZOCEVENT.ZRX and ZOCEVENT.DOC in the script directory.

File Transfer
Here you can select which REXX script is called before a file transfer begins and after a file transfer was completed.  The REXX script can modify the file name before the file is actually written to disk, which can be useful if you want to implement a complex file storage scheme (eg. if ZIP files are uploaded from different directories than other files or if you have special download directories for ZIP files, mail files and pictures) or if you want to automatically run an file compression utility before uploading certain files (and upload the compressed file instead).  Additionally you could automatically unpack all downloaded ZIP files or decrypt incoming PGP files etc.
You will find the technical details in the sample file ZOCXFER.ZRX and ZOCXFER.DOC in the script directory.


Window/Scrollback

Hide window while dialing
If you don't want the large ZOC window around while dialing you can select this option.  In this case ZOC will hide while dialing, just leaving the small dial progress window on the screen, and come back after it made a connection (or failed to do so).

Window to front when carrier detect
If set, the main window of ZOC will come to the top of all windows if the modem carrier detect signal is switched on (as it is when connecting to your host).  This way you can have ZOC dial in the background and jump in if a connection was made.

Minimize window during file transfer
If you don't want the large ZOC window around during a file transfer is going on, this options minimizes the ZOC's main window after starting the transfer.

Window to front after file transfer
If set, the main window of ZOC will come to the top of the desktop after a file transfer has been completed.  This way you can put ZOC aside to do other work during a file transfer without missing the transfer's end.

Disable RD/SD LEDs
Here you can turn off the (maybe annoying and, more important, processor time consuming) flashing of the third and fourth LED in the Status Line that emulate the modem receive-data and send-data LEDs.  If the checkmark is in indefinite state (shaded) the LEDs will be enabled during text output but disabled during file transfer (which is highly recommended unless your computer is a real killer machine).

Show cursor position in status line
This option will display the current cursor position in the status bar where normally the window is is shown.

Window Title
This field can contain a text that will be displayed in ZOC's window title bar.  The text can contain placeholders which will be replaced with values depending on the current situation. e.g. ZOC %VERSION% %CONNECTEDTOHOST% %OPTIONS% or %COMPUTERNAME% %CONNECTEDTOHOST% %OPTIONS%.
%CONNECTEDTOHOST%:  The string "connected to "and the name of the remote host.
%COMPUTERNAME%:  The name of your computer.
%HOST%: The name of the remote host.
%INSTANCE%:  The number of the currently open ZOC window.
%OPTIONS%: The name of the currently loaded session options file.
%VERSION%:  The version number of ZOC.
%ZOCORHOST%:  If not online the String "ZOC Vx.xx" or, if online, the name of the remote host.


Keyboard, Character Translation, etc.

Program options (as opposed to Session Options) are valid for all connections you make.  They contain options that, once they are set, hardly change at all.

Program options are

o	Program Settings

o	Keyboard Redefinition

o	Character Translation

o	Phone Cost Description

o	Toolbar Icons


Redefining the Keyboard

The keyboard mapping function allows you to remap all keys on the keyboard with your own text, special characters or even ZOC functions.

However, this function takes precedence over all keyboard processing in the program, so if you remap a key like backspace or Alt+D it will override the key's default meaning (backspacing depending on the emulation or host directory shortcut).

To redefine a key, first set/unset the check marks for the key qualifiers (Shift, Ctrl, Alt, Num-Lock, Scroll-Lock) associated with your redefinition, then click on the key to bring up the key redefinition window. (Alternately, in most cases it is possible to just press the key combination that you want to redefine.)

Important:  Please be aware that ZOC treats the NumLock and ScrollLock state as key qualifiers.  This means that you can remap keys differently, depending on Num-Lock, Scroll-Lock or both.  If you want to map a key independent of the Num-Lock or Scroll-Lock state, set the check marks for these qualifiers to gray (they have three different states: on, off, gray).

It is even possible to map text to the Num-Lock and Scroll-Lock keys. If you do this, these keys will still toggle the corresponding leds on your keyboard and hence their state.  In that case it is important that all your other keyboard mappings are made with the Num-Lock and Scroll-Lock checkmarks set to gray.

The Show/Print buttons will display a list all your key definitions including all the qualifiers that apply to them.

Using the Load and Save-As functions, you can create and manage multiple key maps which can be assigned to host directory entries in the host directory's edit dialog.

See also:
Options, F-Key Macros
Keyboard Redefinition
Emulation Dependent Key Names
Keys for the VT102/VT220 Emulation
Keys for the 3270 Emulation
Keys for the 5250 Emulation


Redefining One Key

After you selected a key to be redefined in the keyboard redefinition window, a small window appears into which you can type the new value that is sent if you press that key together with the selected combination of key qualifiers (e.g. Alt+Ctrl+Z). Alternately you can map an action to that key combination. The most convnient way to do this is to press the button with next to the entry field.

See Action-Code Assistant, Emulation Dependent Key Names and Codes and Power codes for information on how to map special characters (like Esc, Enter, SysReq etc.) or ZOC Functions to a key.


Translation of Inbound/Outbound Characters

Users in countries that do not use the US-Ascii character set, often end up with the problem that the codes of characters that are sent by the host do not match the codes used by the terminal program and/or operating system.

Using the Load and Save-As functions, you can create and manage multiple translation tables which can be assigned to host directory entries in the host directory's edit dialog.

Note: The translations are only active if the Translate Character option is enabled in the Terminal Options.

Note: Before building a translation table, you should check if the character codes used by your host are already supported as a character set (Windows) or codepage (OS/2), see Window Options).

Case Study

Let us assume your host sends (and needs to receive) the character { instead of the German letter Ä (as some hosts in Germany do) and that you have a keyboard that has a letter Ä key.

Let us also assume that ZOC is configured for the IBM/DOS character set (see, Options, Session Profile, Window). In this case ZOC generates the code 142 when you press the Ä key on the keyboard and will expect the code 142 to be received to display an Ä in the terminal window. (If ZOC is configured for Win/ANSI or running in VT220 mode, the same would apply to the code 196.)

However, instead of the expected 142 the host sends the code 123 (which ZOC knows as {).

Hence, to make the two systems interact correctly, you will map the code 123 in the receive table to 142. To do this double click line 123 in the left part of the window and enter 142 in the field for the decimal code and click ok.  123 { -> 142 Ä will appear in the window.  This will take care of codes that are received from the host. However, to correctly convert the code that ZOC sends when you press Ä, you will have to make an inverse mapping in the right table (double click 142 and change it into 123).

Here is a list of the common Umlauts and the code that ZOC uses, depending on the current configuration (Character Set setting in Window Options).

Character	DOS/IBM	ANSI/Windows (aka Latin-1)
Ä	142 (8 E)	196 (C4)
ä	132 (84)	228 (E4)
Ö	153 (99)	214 (D6)
ö	148 (94)	246 (E6)
Ü	154 (9A)	220 (DC)
ü	129 (81)	252 (FC)
ß	225 (E1)	223 (DF)


Setting up the Phone Cost Description

Introduction

To make ZOC monitor your phone charges you need to describe how the cost is calculated based on the duration, time of day and distance of a call.

First you setup up days and times of day that are of interest for the calculation.  In most countries it is cheaper to make calls in the evening and on weekends than it is during working hours from Monday to Friday. So, you will probably end up with three blocks of time like 08:00:00-17:59:59 Mo-Fr, 18:00:00-07:59:59 Mo-Fr and 00:00:00-23:59:59 Sa/Su.

If, like in Germany, some calls don't depend on the time of day, you would need an additional entry to covers these: 00:00:00-23:59:59 Mo-Fr/Sa/Su.

Next, in the Cost section of the dialog, you would give names like local, near, far, intl. to the distance zones in the field after the distance zone letters (A-J).

Then you would describe what a call costs at any time of day in the form <cents>/<seconds>@<time of day> (speak cents per second at time of day) for each distance zone.  For example, if your telephone company charges 6 cents per minute during working hours and 3 cents per minute during evening hours and weekends, you would enter 6/60@T1, 3/60@T2 and 3/60@T3 in the fields after the distance zone description.

Note: There is an important difference between defining 0.1 cent per one second and 6 cents per sixty seconds.  In the former case you will be billed exactly 0.1 cent per second, in the latter you will be billed 6 cents at the beginning of every minute (the minute is called a time-unit). This way you get 18 cents for a 2 minutes 10 seconds call instead of 13 cents (as in the first case).

If all this is done correctly you can go to the host directory and edit the entries to assign distance zones to them.  After you call such an entry, ZOC will show you the cost of the call in the Status Line, sum it up in the host directory entries memo field (see changing host directory entries) and log it to the call log file (see Directory Options).

Advanced Cost

In some countries you have to pay some basic fee for the connection to be made, or the first minute is more expensive than later ones.

This can be handled by ZOC's cost management by defining a cost like <initial-cents>/<initial-seconds>+<cents>/<seconds>@<time of day>.  If, for example, the first minute of communication costs 15 cents and every later minute costs 12 cents you would set it up as 15/60+12/60@T1

This feature can also be used, to make the cost management more acurate. ZOC starts the timer when the remote carrier signal is detected.  This might be a few seconds after the actual connection was made.  If you have to pay 12 cents for a minute of communication and your modem detects the remote carrier about 10 seconds after the remote modem picked up, you could compensate this delay by defining the cost as 12/50+12/60@T1.

However, for this special case, it would be better to use the 'Time for modem connect' option in the Misc page of the phone cost settings (see further down in this text).

Symmetric Morning/Evening Time Blocks

Many countries' phone companies are charging the same amount of money for calls in the morning and evening, e.g. a phone company might charge 12 cents per minute from 5AM to 8AM and 6PM to 9PM.  In this case you would define two time blocks (e.g. T1 and T2).  However, these could be referenced from one cost field like in 12/60@T1,T2. The same is possible for advanced phone cost entries as in 12/50+12/60@T1,T2

Active Cost

The active cost page shows the letter of that phone cost description which is currently in use.

Special Days

To make ZOC's phone cost calculation even more accurate, you can define a list of days (normally holidays) which should be considered as a sunday (because most phone companies treat holidays like sundays).

To do this, you enter a list of dates each in one line.  If you want, you may add a comment after a space or TAB character.  If you set the year to 9999, the date matches every year (otherwise it is only used in that very year).  Lines beginning with a slash (/), number sign (#) or semicolon are treated as comments.

IMPORTANT: You have to use ISO date format: yyyy-mm-dd! (sorry, this is necessary to exchange fee files without problems.)

A part of the list for Germany might look like this:

9999-1-1     New Year (every year)
9999-10-3    German Reunion Day (every year)
; christmas (every year)
9999-12-25
9999-12-26

96-4-8       Easter Monday '96
1997-3-31    Easter Monday '97
1998-4-13    Easter Monday '98

Jewish Week

This switch makes ZOC treat Fridays like Saturdays and Saturdays like Sundays to allow correct phone cost processing in Israel.

Time for modem-connects

This option allows to define the average delay that occurs after a remote modem picked up the call but before the local modem reports that a connection was established.  If a Carrier Detect signal is reported from the modem (and only from the modem), then the timer will not be reset to zero but to the value that is set here.

Show Timer as

This option controls the display of the phone cost in the status line.

Money
Show the time elapsed since connecting to a host (or resetting the timer) as a money value (according to the Cost Setup).

Fraction
Show how many cost units are used so far.

Online time
Show the time elapsed since connecting to a host.


Setting up the Toolbar

The toolbar makes functions easily accessible by offering icons for them.

To customize the toolbar you can select/deselect icons from a list by clicking on them with the mouse.  Those entries in the list that are drawn with dark background will be shown in the toolbar (if the window is wide enough).

Additionally (depending on screen resolution and your personal taste) you can select if you want the icons in the toolbar to be large or small and if you want them to be packed tightly or not.


Session Options

This dialog contains all session options.  Select a tab with the mouse to open the according dialog.

Available tabs are: Device, Terminal, Logging, Emulation, Transfer, Modem, User Buttons/F-Keys, AutoMacros, Window/Colors, Fonts


Device Options

This window is used to define serial parameters or their equivalents for other input/output devices.  It can be opened via menu or by clicking on the transfer speed button in the status line.

I/O Device

You specify the device which ZOC should use to make a connection. Help for the individual devices is available in the device description of this help text:

Secure Shell
Telnet
Serial/Modem
Windows-Modems
ISDN
Rlogin
Named Pipe

Additionally you can select that ZOC shall release the device when the window is minimized.  However, this is only necessary in case of the Serial/Modem device because this is the only device that locks a system resource (the com port).

The 'No Statistics' switch suppresses the output of the session statistics (number of chars transferred etc.) at the end of an online session.

The descriptions for the options of each device are located in the devices section of this help text.


Terminal Options

This window is used to define general terminal characteristics.  It can be opened from the menu or by double clicking the space between the buttons in the status line.

TERMINAL

Local echo
Print all manually typed characters to the terminal window (normally the host sends all typed characters back to display them).  This option should be used if you use a half duplex connection (which are pretty rare these days) or if you type to a host that does not provide an host echo (e.g. if you called a friend's computer who uses a terminal program as well; however, in this case you are better off with the Split Chat from the View Menu).

Echo CR only
This option makes ZOC echo only a Carriage-Return when the Enter key is pressed (normally a Line-Feed is echoed as well).

Incoming CR, CR/LF
This options ensures, that each incoming Carriage Return is followed by a Line Feed.  Use this if received text is printed over and over in the same line without advancing to the next or if the text is printed like a stairway with the cursor moving down at the end of the line but not moving to the left edge.

Translate characters
If you call a host that uses a different character set than your computer, it is possible to have ZOC translate these into your native character set (see translation).  The translation can be disabled using this option.

Send echo
Loop back all incoming characters to the originator. (You can use this, if a friend called you with his modem.)

Warning: This may result in an endless loop if the originator also sends an echo, which is true for most modems and hosts.

Beep
This option controls what to do for a beep.  Choices are ignore (unchecked), acoustic (checked) or visual (shaded).  This setting is ignored if you have defined a WAV file for the extrnal beep in the global options.

Software 7E1
This option is used if a host with 7E1 coding is accessed through an 8 bit Gateway (ISDN, Telnet).

Strip high bit
If enabled, all characters in the terminal window are printed with 7 bits. This can be used if you receive graphical characters where text should appear (of course, this does not help if bursts of noise from the phone line send garbage to your screen).

TIMEOUT CONTROL
These options control what should happen if no characters have been sent or received for a certain time.
After a timeout occurred you can have ZOC send something to your host to prevent disconnection.  In this case it is a good idea to use a string that does not invoke any unwanted action (like paging the sysop for a chat), but something neutral like ^M (enter), ^! (break signal) or * (which jumps to the main menu on some hosts).
If you don't like this, you can have ZOC hangup after a timeout.
If you do not want any timeout control at all, set the time to zero.

SCROLL-LOCK KEY ACTION
This option lets you map events to the scroll lock key.

Ignore Scroll Lock
ZOC ignores the scroll lock state of the keyboard.

Activate Local Typing field
Pressing the Scroll Lock key toggles the chat field (see Window Options and Screen Elements).

Toggle doorway mode
Pressing the Scroll Lock key toggles the keyboard Doorway mode. (Doorway mode is a mode in which special key codes are used. It is required by remote control software like RemoteBBS or OS2YOU).

CURSOR TYPE

Big cursor
Enabling this option makes the cursor in the main window larger.

Blinking cursor
Enabling this option makes the cursor in the main window blink.


Emulation Options

This window is used to set the emulation.  It can be opened via menu or by clicking on the emulation button in the status line.

Available emulations are:

ANSI BBS
The ANSI Emulation is mostly used in BBSs.  It's main feature is that it uses the IBM-PC graphic character set and allows to display text in different colors.  For compatibility with the FIDO ANSI-BBS standard, it also supports all VT102 control codes.  Under Unix it is commonly refered to as TERM=pcansi

ANSI SCO
A slightly different implementation that uses different codes for the extended keys (fkeys, ins, end, etc.).  Unix systems that support this emulation know it as TERM=scoansi

AVATAR/0+
An emulation mainly used on the FIDO BBS network.

CEPT
The CEPT emulation can be used to call the German T-Online service (formerly called BTX or DATEX-J) and probably other CEPT based services as well (like Prestel).  For further details, please check the CEPT topic in Common Questions.

Note: The CEPT emulation overrides the F-keys F6 (reveal), F7 (tia), F8 (DCT), F9 (INI) and F10 (TER).

IBM 3270
The 3270 family of emulations is used with IBM mainframes. ZOC does not support 3270-color coding but offers a range of predefined color style (based on common 3270 emulators).  The key definitions are listed in 3270 keyboard mapping.  You can also find an options file (OPTIONS\3270.zoc) that provides user buttons for some common and unmapped keys.

IBM 5250
The 5250 emulation is used with IBM iSeries eServer (former AS/400). The emulation needs to be used with the telnet device (this combination is commonly known as TN5250).  The key definitions are described in 5250 keyboard mapping.  You can also map other special keys to other places on the keyboard or to user buttons by using emulation dependent key names.

Linux
Your choice of emulation when dealing with Linux hosts. The emulation supports most of the available pc-keys as well as color. On the host side set TERM=linux

Sun CDE
This emulation is the prefered emulation on Sun Solaris (Common Desktop Environment) machines.  It is based on VT220 but offers color support together with f-keys and extended keys.  Set your Solaris machine to TERM=dtterm

TTY
This emulates a teletype style output.  All characters are printed except CR, LF and TAB.

VT100/VT102
VT102 is mostly used in Unix environments and is compatible with the (slightly inferior) VT100 standard.  VT102 is a good all purpose choice, which will work on 99% of the systems.  However does not support colors and extended keys (except F1 - F4).  Under Unix use TERM=vt100 or TERM=vt102

VT220
VT220 Terminals are a major improvement over VT102.  They support most of the keys found on a PC keyboard (please check VTxxx keyboard mapping) and they support national character sets in a consitent way.  However they do not support colors. Almost all Unix systemtes should support his emulation if you set TERM=vt220.

VT52
VT52 is a very old standard from DEC and is hardly used anymore.  It is not upward compatible with VT100, VT102 and VT220.

QNX
Also available is an emulation for use with the QNX 4.2x real time operating system.  This emulation was originally developed by Ingenieurbuero Jurk in Weisenheim and Mr. Jurk was kind enough to provide us with the source code for general inclusion with ZOC.

The following options are available in some or all of the emulations:

Swap DEL and backspace key
If you enable the this option, a backspace is sent when the DEL key is pressed and vice versa.

Map backspace as DEL
This option sends the DEL code when backspace was pressed.  The Del key remains unaffected.

Discard control codes from log
Screen control for emulations is done by sending special control codes. Logging of these control codes in the capture/log file should be disabled since it makes reading of these rather hard.

Disable appl. key pad
In VT102 mode the numeric key pad is used as a replacement for VT102 auxiliary keypad (see VT102-keyboard).  This can be problematic if you are using the cursor keys in the numeric keypad instead of the gray cursor keys.  Enable this option, if you want to use the cursor keys in the numeric keypad and if your remote application does not use the VT102 keypad.
See VT Keyboard for a description of the keypad.

Original VT220 F-Keys
There are two standards for VT220 F-Key codes.  This option allows to switch between the two (the original VT220 keyboard ignored F5).

Map PF1-PF4 to top row on keypad
The orignal DEC terminals had the PF1 to PF4 keys located above the numeric keypad.  With this options ZOC uses the key pads Num, /, * and - keys as PF1 - PF4.

Use Alt as Meta key
Some Unix applications (like Emacs or MC) are using the Alt-Key combinations to access special functions.  Enabling this option makes Alt+Letter and Alt+Digit combinations send the pressed key prefixed by an ESC character.
Note: When you enable this option, you will not be able to access ZOC's menu shortcuts.

Destructive backspace
This options erases characters from the screen if a backspace is received (instead of just moving the cursor back one step).  It is ignored in emulations (like VTxxx) that have dedicated backspace handling.

Print Job Merging
When printing to the local terminal printer (via VT102 codes) some programs send start/stop printing codes for every line, causing the OS/2 or Windows spooler to print every line onto a single page.  This option controls the timeout (in seconds) ZOC uses to merge subsequent printing jobs into one (0 disables this feature).
If your remote application requries transparent printing (printing includes printer control codes) you need either select a printer port or install a Generic/Text-Only printer (see help for Printers in ZOC's Program Settings).


File Transfer Options

These settings define the characteristics of file transfers. They are accessed via the Options/Settings dialog or by clicking the file transfer protocol button in the status line.

PROTOCOL
Select X- Y- or Zmodem protocol or any of the other protocols offered here.

Note: Some systems falsely offer protocols named Ymodem and Ymodem batch, which really are Xmodem with Block-1024 for Ymodem and Ymodem for Ymodem-Batch.

Note: You do not need to select the Compuserve-B+ or CEPT/Telesoftware protocol because these are invoked automatically).

IF FILE EXISTS (TRANSFER-2)
Select what you want to do if you try to download a file that already exists in your system's download directory.  You can choose different actions in case the in coming file has a modification date that is older, same or newer than the existing one, or if the incoming file has no modification date at all (eg. when transferred with Xmodem).  Additionally you can specify if you want the old (existing) or the new (incoming file) renamed (if rename is chosen somewhere).

SPECIAL FILE EXTENSIONS
ZOC lets you list extensions of files that should be downloaded to an alternate directory (see Directory Options) and files that should be deleted after they are uploaded successfully.
The extensions may contain the * and ? wildcard characters and need to be separated by vertical bars (without space characters) like this: GIF|Q*|MO?|TU?
Note: Just specify file extensions, no full file names like like *.GIF|ABC.DOC
Note: If you want to implement a more complex scheme, you can use the a REXX file (see Program Options, Directories).

XMODEM
These options only apply when the Xmodem protocol is selected.

CRC on
CRC is controlled by the receiver of a file.  CRC can be used instead of the less reliable Xmodem checksums.

Blocksize 1024
With this option Xmodem uses blocks of 1024 instead of 128 bytes.  Some systems falsely call this Ymodem.  The block size is controlled by the sender.

Chop pads
If enabled, ZOC tries to remove padding bytes at the end when receiving a file.

ZMODEM

Upload File Management
These options apply only to uploads.  They are only effective, if the receiver is able and willing to handle them, so they may or may not have an effect on an actual file transfer, depeding on the receiver's Zmodem implementation (they work best when used to send files to Omen Technology's RZ or DSZ, which is available on various platforms including Unix, VMS and MS-DOS).
You can specify that you want the receiver to convert carriage returns and line feed according to it's platform and you can suggest what the receiver should do if a file aready exists on it's  machine.  Options are to use the receiver's default action, to always overwrite files, to overwrite files if their file date is older, to resume an aborted file transfer or append the data to the existing files (the corresponding Unix SZ options are -p, -y, -n, -r, -+).

ASCII
The ASCII options are used when it is necessary to do an end-of-line character translation between different operating systems.  It is useful when transferring text file, but has disastrous results when applying to binary data like ZIP files or executables.

Ignore time stamp
Select this option, if you want received files to be marked with the date/time of download, instead of being marked with the time stamp the file carried on the file system of the sender.

KERMIT
These options are for use with the Kermit file transfer protocol. Normally the standard values should work fine (press the Reset button to set these).  The block size can be any number from 80 to 9024. If you are working in an environment that allows only 7bit transmissions, uncheck the 8bit option.

ASCII-UPLOAD/CLIPBOARD SENDING
These options are used for the functions Send Text File, Send Binary File and for pasting from the clipboard.

AsIs/CR+LF/CR/LF
Sets the way end of line characters are transmitted to the remote machine. When set to AsIs, characters will be sent as they appear in the file, otherwise either only CR or LF or both is sent. (Ignored for binary files.)

Delay
Sets the time (in milliseconds) to wait after sending a character and after each line.  This is useful if the host cannot keep up with fast input (eg. in online editors). Note:The line delay is sent in addition to the character delay. If the character delay is zero or if you are sending a binary file, the line delay is ignored.

MISCELLANEOUS (TRANSFER-2)

Set process priority to time critical
Enabling this options boosts ZOC's priority during file transfers, which might help to increase transfer throughput and reduce transfer errors in some very special cases.  This option should not be used without good reason. other tasks.

Try to guess upload file name
If this option is enabled, ZOC will try to guess the name of the file to be uploaded and will offer that name in the upload file requester.

Start transfer automatically
If enabled, ZOC starts transfers automatically.

Start picture viewers
ZOC is able to show pictures while downloading them.  For this purpose the file SHOWEM.DLL are provided in your ZOC directory.  If you don't like this feature, it can be disabled.

No wait after transfer
This option turns of the 3 sec. waiting time after a transfer completed.


Logging Options

This window is used to define file logging parameters.  Additionally you can enable some debug trace functions (mainly used by technicians and developers of serial applications/devices).

LOGFILE

Default name
When you start ZOC, the name defined here will be used as a default name for the logfile.  You may use special place holders in the name to be substituted by ZOC with values like the current month to create dynamic names (see Special Codes in the appendix). The file will be placed in the log directory set in Path Options unless you supply a path with the name.

Now active
Enable saving incoming data in the logfile.  This is the same as the checkmark near the log file name in the status line or the Log to File entry in the Logging menu.

Append if File Exists
If logging is activated, data is appended to a existing file rather than overwriting it when you start logging.

Log Session Headers
Session headers are a few lines of information which are inserted into your capture and log file when connecting to a host.  This can only be done if you have a valid Carrier Detect signal (see Device Options).

DC2/DC4 control
Some hosts (i.e. CompuServe's mail system) are able to remotely turn on/off logging by sending DC2 (^R) and DC4 (^T) characters (the check mark in the status line will turn gray if the hosts suspends logging for you).  This can be disabled.

TRACE

Show ctrl chars
Show received control-codes as plain text (e.g. ^I for TAB) instead of using them.  This is used mostly for problem determination.

Show hex dump
This options shows incoming characters as hexadecimal values.  It is intended for problem determination only.

Write Ascii Trace
Write a trace file (ZOCTRACE.ASC) which contains all sent and received characters with time stamps in human readable form (mixed text, control code names, hex codes).

Write Binary Trace
Writes all sent characters to the file ZOCTRCOUT.BIN and all received characters to ZOCTRCIN.BIN


Creating a Modem Init String

It sometimes is not easy to find the proper modem init string.  Some comm programs offer modem databases but with new modems coming to the market almost every day it is hard to ensure correctness of these.

On the other side, it is not very hard to dig the correct commands from the modem manual if one knows what to look for.

Modems with data compression have a rather tricky setup, but since modem manufacturers don't want to spend all their profits on customer support, almost all of these modems have two factory profiles: Data compression enabled and disabled.

These profiles can be activated by using rather simple commands (probably AT&F), so it is very likely that all you have to do, is to check your modem manual for factory profile command and use that as the modem init string, e.g. AT&F^M (if you use data compression make sure you have RTS/CTS and a high-speed enabled in the Device Options).  If AT&F does not work, try AT&F1

If you are using OS/2 Warp and if you have the Internet access kit installed, you will have a modem list on your harddrive in the file C:\TCPIP\ETC\MODEM.LST.  If you find your modem there, you can use the second init string listed there and add &F after the AT, e.g. if your modem is listed as

USRobotics 33600 Courier     AT&F    AT&D2&C1X4V1Q0S7=70&M4&B1&H1&R2

you can use AT&F&D2&C1X4V1Q0S7=70&M4&B1&H1&R2 as your init string.


Modem Options

This window is used to define the strings ZOC uses to communicate with your modem.  These strings may contain control characters (e.g. ^M, see Special Codes), the tilde (~, which is a delay of 1/3 sec) and ^# to be substituted with a phone number.

Initialization
This is a list of modem commands to set the modem to a defined state before using it.  You should be aware that ZOC (unlike some other programs) requires a ^M at the end of the initialization string.
If you don't know what to use for the initialization string, please try either AT&F or AT&F1 or check the Modem Init section of this help file for advice.
Depending on your setup, you might want to send the initialization string every time you load an options file (thus having different options files for different modem configurations).
Normally ZOC does not send an init sequence if it finds a carrier detect signal from the modem (to prevent a modem reset while you are online). However, some modems provide a CD signal after power on.  In this case you should enable this option (and add AT&C1 to the modem init string to tell the modem to provide a real carrier detect signal).

Dial Commands
ZOC lets you set up four dial commands for calling different types of numbers (i.e. using a credit card number to make long distance calls).  You can select the dial command to be used from the Host Directory and when dialing manually (from the File Menu).
To dial via modem a comm program has to send a dial command and the phone number to the modem and has to complete this command by sending ^M.  The dial commands are ATDT for tone dialing, ATDP for pulse dialing and ATDI for Zyxel ISDN modems.  This means that for the dialing fields you use the appropriate dial command, append the string ^#  (which is replaced with the telephone number) and ^M  This means that a standard dial command would look like ATDT^#^M (meaning that  ATDT, then the phone number and then enter is sent).  If you wanted to set the modem to ignore the dial tone and send a zero before the telephone number to get an outside line, you could use ATX3DT 0,^#^M  instead (X3 would prevent the modem from waiting for a dial tone and 0, would send a zero and make a pause before dialing the phone number).
If you want to issue a modem command before dialing you should add some tilde characters between the modem and the dial command (like in ATZ^M~~~ATDT ^#^M) to give the modem time to process the former.

Hangup
ZOC supports two methods of telling a modem to hang up.  Using the DTR signal of the com port is the superior of the two.  If you disable it, ZOC will use the ATH command.

Auto answer
Here you supply two modem commands to enable and disable the modem's auto answer mode.  These are ATS0=1^M and ATS0=0^M for basically all modems.

DTR Control for DOS-Transfer
These are two special modem control commands which are needed to give DOS programs access to a ZOC session (see Transfer DOS-Shell). These commands need to switch the modem's DTR action from hangup to ingore and vice versa while being online.  By default this is achived, by sending the modem's escape string with a pause of 1.3 seconds (+++~~~~), then sending the modem command to set DTR action and giving the modem time to OK (ATDx^M~~). After that the modem is switched back to online operation (ATO^M). These commands may vary with some modems brands; if they don't work with your's, please check your modem manual for equivalent commands.


Definition of the AutoMacros

Besides the function key macros ZOC provides so called Auto-Macros.  The idea of AutoMacros is borrowed from text processing where (at least in good programs) the feature is called Auto-Correct or Auto-Text.

You can think of AutoMacros as abbreviations.  Whenever ZOC finds that you typed some text that is found in the abbreviations, ZOC will replace it with the full text you provide here.  This is done by sending backspace characters to delete the abbreviation (if necessary) and then sending the full text (if the abbreviation and the full text begin with the same characters  ZOC will only backspace the part at the end that differs, like Datcom and Datacommunication).

To avoid erroneous replacement of characters that belong to a word, abbreviations are matched case sensitive and replaced only if there is a non alphanumeric character typed before and after the text.  So, if you defined Com as an abbreviation it will be replaced if you type Data-Com_ or Com-Port, but not if you type The Com1-Port or DataCom_.

Besides correction of typing errors there are many other uses for this feature in a terminal application.

o	Abbreviations for commonly used phrases like Ttyl being replaced with Talk to you later

o	Abbreviations for logins like replacing MS with Markus Schmidt^Msecret (to send user name and password at login prompts).

o	Abbreviations for commands when using a shell on a UNIX or VAX host. (e.g. using lo instead of logout).

o	Nicknames for email addresses (like replacing ms@ with m.schmidt@emtec.com).

Note: This feature is disabled during REXX execution and during AutoLogin and Learn mode.

Note: This feature is similar to the AutoReplies (see below) and some results can be achieved by using both methods.  However there are one important difference: AutoReplies monitor the incoming data stream (sent by the host), AutoMacros watch the keystrokes from the keyboard.

Note: It is a good idea to append a period or an exclamation mark to the abbreviation text (like MS. or lo!) to make it really unique.  This way inadvertent invocation of the full text will be highly unlikely.

AutoReplies

Auto replies provide a way to automatically send text or invoke ZOC actions programs (or other magic) whenever a group of specific characters is received.

This feature can be used to

o	Automate logins: You could automatically send your username and password (or ^&, see Special Codes) when receiving the text User name?

o	Skip birthday checks: Some hosts ask for your date of birth now and then to make sure no one else uses your account.  Using AutoReplies you can provide the date automatically when receiving the prompt.

o	Reading mail: When you receive the You have mail notification from your unix host, you could start your mail reader by automatically replying elm^M.

Warning: You should make sure that the text you are looking for really is unique.  It is better to wait for the text --More-- than it is to wait for More to automatically answer such prompts.

Note: This feature is disabled during REXX and script execution and during AutoLogin and Learn mode.


Definition of the User Button Bar and F-Keys

Below the tool bar reside a group of user defined buttons that can be specified here.  You can set the value to be sent when the button is clicked with the mouse as well as a short text to describe the button (which is shown inside the button in the custom button bar).

This dialog lets you also map text or special actions to the top row of your keyboard (see also  Options, Keyboard Remapping). Mapping these keys here will override the definition of these keys if they have a special meaning in an emulation (e.g. VT220 and Linux have predefined values for all f-keys, VT102 uses F1-F4, etc.).

It is possible to use button and f-keys to send text, execute REXX scripts, etc.  The help page for the Edit dialog will describe more details about this.


Window Characteristics

Please also read the topic Fonts, Window Size, Color for additional information regarding this dialog.

WINDOW FONT, SIZE and SIZING

Terminal Size
You can select the terminal size here (columns by rows).  Usually a terminal size of 80x25 is used.  This option also interacts with options in Sizing/Fonts

Colors
Here you can choose from a predefined palette of colors for the fore and background and for rendering characters with specific attributes, e.g. you can display characters in yellow when the host wants to display them underlined.  Depending on the terminal emulation, the remote host can change the display colors to highlight text.
The 16 color values are an industry standard and can only be changed with some extra efforts.  If you want to do so, you can use the Edit Global Color Table button to assign a new color to each.  Whenever a remote host requests one of the colors, e.g. "green" ZOC will use the color you defined in the global table.
IBM 3270/5250 Note: The 3270 and 5250 emulations technically require complete color sets.  Hence the fore and background colors will be ignore.  Instead ZOC offers a selection of color schemes (combinations of some of the 16 base colors) for these 3270/5250 emulations.  These can be selected in Emulation Options.  Modification of the global color table (see above) will affect the colors in these schemes.

SCREEN ELEMENTS

Scrollbar
Here you can turn off the scrollbar at the right of ZOC's main window.

Menu
Since ZOC shows a popup-menu when you click the right mouse button in the main window, you can disable the permanent menu below the title bar.

Toolbar
Here you can turn the toolbar on or off.

Custom button bar
Here you can turn the strip with custom buttons that appears below the toolbar on or off.

Local typing
The local typing field is an input field above the status line that lets you type, edit and retrieve earlier typed text.  The text is sent to the host when you press enter.  This is useful if you join an online conference with many people or if you work with a shell on the remote host that does not provide command editing or a command history.
The local typing field can be turned on and off with the Scroll-Lock key as well if you defined this in terminal options, or by pressing Alt+C.

Note: To chat with a friend who called you, it is better to use the Split Chat feature from the View Menu.

Status line
Here you can select, if you want to see the status line.

Snippets
ZOC monitors your input data stream for filenames, fido node numbers, CompuServe user IDs and Internet user IDs and collects them in a little window that floats aside the ZOC window (see View Menu).  With this option you can hide (grayed) or show (checked) the window or turn this feature off (unchecked) to save CPU load.

Note: Under OS/2 you can change the font of the Snippets window by dragging a font from the System, Setup, Fonts folder of OS/2 and dropping it above the Snippets window.

Scroll Jumps
While offering superior ease of use, graphical user interfaces like Windows or the OS/2 WPS have to handle far greater amounts of memory to maintain their displays than text based user interfaces have (e.g. a character in a text mode application is stored in two bytes while a 8 by 14 character on a 256 color screen uses 104 bytes).
This results in rather high CPU load, especially when scrolling.  Because of this, ZOC is only able to write text to the screen with about 9600 bps if the text appears at the bottom of the window and it's necessary to scroll up.  However, you can allow ZOC to delays scrolling until a few lines (e.g. five) of text have arrived.  This way ZOC saves CPU cycles (since it needs to move the image only one instead of five times and since it does not make a difference how far it is moved). Obviously output speed benefits from this (while the scrolling appears rather "jumpy" instead of smooth).  The farther the jumps you select (normally flea jumps should be enough) the more lines ZOC will collect before actually scrolling and the faster output will be.


Font and Window Size

Please also read the topic Fonts, Window Size, Color for additional information regarding this dialog.

WINDOW SIZING

... adjust font size
This option will change the font size when you change the window size.  This way you will always see all the text in the window while retaining the logical terminal size eg. (80x24, see Window Options (Terminal Size)). If this option is turned on, you will not be able to select a font size in this dialog (see below) because the font size will be automatically determined depending on the size of the window.  Also, sizing of the window with the mouse will only work in larger steps because only such sizes will be used, for which there is a matching font.

... adjust number of cells
This option will, when the ZOC window is sized, keep the font but change the logical size of the terminal window (eg. from 80x24 to 87x32). See Window Options (Terminal Size)

... leave cells/font unchanged
This option will keep the font and logical terminal size.  This will prevent the ZOC window from becoming larger (or smaller).

FONTS

Font
Select a font size for the terminal window from the list (see also: /FI and /FX command line options).  The font list only contains fonts, where all characters have the same width (non proportional fonts).  This is required for correct display of tables etc.  The font size is given in display pixels "height x width" (this is different from the "points" size which is usually used in text processing programs).  The size of the terminal area (where text is displayed) depends on the terminal size (number lines and characters per line) and the font size.

Char. sets, Codepage

Windows:  ZOC for Windows only supports two character sets: The DOS/IBM character set (which is mostly used in DOS based BBSs) and the Windows/Ansi/Latin-1 character set (which is identical to the character set used in MS-Windows and similar to many multilingual character sets).

OS/2:  If your host sends a character set that is supported by an IBM code page you can specify it here.  Usual values are 850 (multilingual) and 437 DOS/IBM.

 See also: Fonts, Window Size, Color


Fonts, Window Size, Colors

The text handling of a terminal emulation differs noticeably from a text processor.  The topics below explain the way ZOC deals with the issues regarding fonts, window size and color.

Fonts
Terminal emulations can only use fonts where all characters have the same width and height, i.e. where the letter i has the width as the letter W.  This is necessary to display tables or indentations correctly.  Under Windows this is true for the Lucida Console or Courier New fonts.

Additionally the host expects that certain characters are displayed when a certain code is sent to the terminal. For expample some hosts send a code to display a line graphic characters while others may send the same code to display a european language character.  The mapping of characters to codes is defined in so called character sets.  Most hosts either expect the Windows/Ansi/Latin or the IBM/DOS character set.

Fonts and character sets are configured in Options, Session Settings Fonts

Window Size
Most remote hosts display text in a fixed number of lines with a fixed number of characters per line.  Usually 25 lines of 80 characters are used (this may differ depending on the host and emulation).  Thogether with the fact, that all characters in a font have the same width and height, this determines the screen space necessary to display the terminal area. 25 lines of 80 characters with a small font will take up less space than 25 lines of 80 characters with a larger font.  ZOC will adjust it's window around the space which is necessary to display all lines and characters with a given font.  This means that the size of the ZOC window depends on these factors.

The ways how font selection interacts with window sizing can be configured in Options, Session Profile, Fonts and partly relies on the terminal size configuration in Window Characterists

Colors
Most emulations work with a set of 16 base color (black, red, blue, green, ...).  In Options, Session Profile, Window you can select the colors, which ZOC will use for text and background.  However, the text and background colors can be changed by the remote host (e.g. it may switch to yellow to display highlighted text).  Remote hosts usually assume gray text on black background so the colors which the remote host selects, may or may not be good to read on your individual configuration.

In the window configuration it is also possible to change the 16 base colors.  When this is done, ZOC will display your selected color when the remote application requests one of the 16 base colors.  Usually the global color table is only changed to modify the color tones of a given color, e.g. to make the standard green a bit brighter or dimmer or to give it a different tone of green. However, taking this to the extreme, it is also possible to select a compeltely different color, so that ZOC displays orange when the remote host requests green.  Naturally this may lead to surprising results.

In the IBM 3270 and 5250 emulations, the text and background color settings are ignored.  The reason for this is that these emulations work based on functional colors, i.e. the host will request hightlight color, status color, message color, etc. from the terminal.  Due to the vast number of combinations possible, ZOC comes with a selection of color schemes whichs colors have been selected for good readabiliby.  You can select one of these color schemes for the 3270 and 5250 emulations in Options, Session Profile, Emulation. The color schemes are built from the 16 base colors, so it is possible to change them by changing the global color table in Options, Session Profile, Window


Action-Code Assistant

Keys, user buttons and macros can be configured to send text or perform special tasks like calling a host from the host directory or sending special emulation dependent keys.

When specifiying text to send, you can use the control codes from the list shown in Control Codes, e.g. ^M for Enter or ^I for Tab.

To send a single emulations specific key, e.g. 3270 SysReq, you would put SysReq (see emulation dependent key names) in the action field and select "Name of an emulation dependent key" as the type (to send multiple such keys, you will need to put multiple ZocSendEmuKey commands into a REXX script and specify the REXX script as an action, see below).

To start a REXX script from a key or button you will enter the name of the script file in the action field, e.g. script.zrx and click on the button that tells the assistant that the text in the field is the name of REXX script to run.

For connections to hosts, which are listed in your host directory (File menu) you enter the name you gave the entry in the host directory and specifiy that it is the "Name of a host directory entry to call".

The buttons in the assitant dialog correspond with the table of power code at the bottom of Special ZOC Codes.


Input/Output Devices

ZOC supports a list of I/O devices over which you can communicate. Here is a list of the devices and their explanations regarding options, usage, etc.

Telnet
Serial/Modem
ISDN
Rlogin
Secure Shell
Named Pipe
Windows-Modems


About the Telnet Device

The telnet device allows telnet access to remote hosts through an internet connection.

To make a connection to a host you provide the host's name or internet address instead of a phone number, e.g. bbs.fonix.org. ZOC will try to connect to the host using your internet connection.

You will be connected to the standard telnet port (23) of the remote host. If you want to connect to another port, you may provide the port number or service name after the host name or address separated by a colon or space. Examples: mail.somewhere.net 25 or mail.somewhere.net:25 or : mail.somewhere.net smtp.

If you get an NO RESPONSE error you can try to put an * (asterisk) in front of the host name (or address).  This way ZOC will not try to ping the host before making the call (this will help for hosts that take very long to respond): *slowhost.leisure.net

The following options are available for telnet sessions:

Send CR as CR/NUL
Enable this option if your host requires a NUL character sent after a CR character if the CR character isn't followed by a LF character.

Host sends CR/NUL in binary mode
Try to enable this option if binary file transfers (eg. Zmodem) through telnet connections fail.

Start session with local echo on
If this option is enabled, ZOC will use local echo (which is faster than remote echo) when the session starts.  However, during the login process this option is often overridden (ie. changed back to remote echo) by the remote host.

Start session in binary mode
If enabled, ZOC will try to negotiate a binary session.  This is sometimes necessary for file transfers.

Do not disconnect on error
If a transmission error occurs, ZOC normally closes the connection.  With this option checked, ZOC will keep the connection alive.
:PT(GLOBAL OPTIONS).

Do not ping host
Normally ZOC tries to PING the host to determine if it is active before making the actual call.  On systems (like TIA) that do not support PING, this will let the call fail (error NO RESPONSE).  In this case, enabling this option should help.

Do not lookup hostnames from IP
If you connect to a host by using it's IP ZOC normally looks up the host name.  You can turn this off, if you do not want this (eg. because your name server costs money).

The telnet device adds three functions to ZOC's file menu.

Are you there?
This functions tries to trigger a response from the remote host (usually something like [YES]) to find out you are still connected to the host.

Interrupt Process
This function aborts the program that currently runs on the remote host. It is similar to pressing Ctrl+Break locally.

Abort Output
This function aborts output from the remote host (eg. when accidentally showing a large text file).

Commands for the ZocDeviceControl script command

None.


About the Serial/Modem Device

The Serial/Modem device allows access to modems or other serial devices which are hooked a serial port of your machine (eg. COM2) or accessed through an OS/2-LAN (eg. \\SERVER\MODEM). Sharing of modems on a Windows network is not possible unless you have a modem sharing program like Stomper (see the EmTec web site for a link).

Serial/Modem Options

Com-Port
Enter the name of the communications port in this entry field.  This is usually a string like COM1 (with no space between COM and 1). WindowTo access com ports higher than 8 on Windows NT or 2000 use \\.\COMxx.  For using remote COM-ports in a Windows Network, a modem sharing tool (like Stomper, see links on EmTec's WWW site) is necessary.
OS2: If you using a COM port on an OS/2 network server, use a string in the form \\<server>\<resource> (in which case you might want to adapt CHARTIME and CHARWAIT in \IBMLAN\IBMLAN.INI as well (ask your administrator for details)).

Serial Options
In this section you define how data is transferred between your computer and the modem (which is not necessarily the same way the modem uses to transfer data across the telephone line).  You have to select a speed (bits per second), the number of databits, a parity mode (none, even, odd, mark or space) and the number of stop bits.
What you use depends mostly on your host (and, of course, on your modem limits).
These settings are often given (e.g. in instructions of how to call a host) in an abbreviated version, like 38400-8N1 (38400 bits per second, 8 data bits, no parity, one stop bit).

Note: If you have a modem with data compression (MNP5 or V.42) you should use a speed that is higher than the actual speed your modem supports.  Today 36,600 bps modems are very popular.  These use online data compression which allows them to transfer actually more than the theoretical maximum of 5000 bytes per second.  To take advantage of this, you should access these modems with 57.600 bps.

RTS/CTS handshake
If enabled, ZOC uses RTS/CTS hardware handshake for communication with your modem.
RTS/CTS is used to control the flow of data between the computer and the modem and provides a way for both to prevent the other from sending data.
This is essential for file transfers when the speed of the modem to modem connection is different from the modem to computer connection (which is true for MNP5 of V.42 modems).  It is also essential in a multitasking environment where the processor might have other things to do when data arrives.
Thus, it is highly recommended to have this option enabled.  However, the modem needs to support it as well, so check your modem manual for the proper modem command to "enable bi-directional RTS/CTS hardware flow control" for use in the modem init string (see Modem Options).

DSR handshake
This DSR/DTR handshake is somewhat similar to RTS/CTS as it is a handshake method as well.  It does not control the data flow, but the general availability of the modem and computer (i.e. if these are turned on).
If enabled, ZOC monitors the DSR signal for communication with the modem. This option should only be enabled if your modem and your cable properly provide the DSR signal.  Otherwise ZOC will be blocked.

XON/XOFF
If enabled, ZOC uses the Xon/Xoff software handshake for communication (which is yet another method to control the data stream).  It uses special characters to hold/release the sender.  This method is inferior to RTS/CTS handshaking and should only be used if necessary.

Valid CD signal
If your modem supports the Carrier Detect (CD) signal (most modems will do this if you add AT&C1 to the modem init string in the Modem Options), you should enable this option (which is highly recommended).
ZOC uses the CD signal to control the connection timer and phone cost calculation as well as to write a calling log to the file defined in Path Options.

Break signal duration
The duration that is used for sending a break signal (some hosts use this to break an operation) when pressing Ctrl+End.  It is given in milliseconds and typically ranges from 250 to 400 ms.

Commands for the ZocDeviceControl script command

GETSTATE
Return a string that indicates the raised signals on the COM port.


About the ISDN Device

The ISDN device controls ISDN boards directly through the manufacturer's CAPI 1.1 (OS/2 only) or CAPI 2.0 driver interface.  The device list will show the ISDN device only if such drivers are correctly installed on your system.

ISDN options

The following options are available for ISDN sessions.  The options dialog offers three buttons to set the most commonly used combinations of settings.

B1/B2/B3
Here you can select the used layer-1, layer-2 and layer-3 protocol.  However, not all manufacturers implement all protocols.  The default for layer-1 is 64K-HDLC, for layer2 X.75 and for layer-3 TRANS.

CEPT telematic
This option must be selected for using CEPT-based protocols (like the german T-Online) because of their special packet handling.

Framesize
The frame size (block size) can be set from 128 to 2050 bytes.  Frame sizes greater 2048 bytes (plus overhead) are not allowed in CAPI V2.0 and should not be used.

Windowsize
The window size can be selected between two and seven and sets the number of ISDN messages that can be sent from the remote host without acknowledgement from ZOC.

Predefined
These buttons set the above parameters to predefined configurations. 'Standard' will work in most cases (especially if you call hosts which use CFOS or ISDNCOM).
:PT(GLOBAL OPTIONS).

Listen MSN
Here you can list all numbers (MSNs) for which ZOC will accept incoming calls.  Multiple MSNs must be separated by "|" characters, like in "7406933|7406934".  If no MSN is listed, ZOC will accept digital data calls for all MSNs.

Source MSN
This field defines the phone number (MSN) that will be used as the caller id when you make a call.  If you do not list a number here, the ISDN network will provide the main MSN of your ISDN socket.

Controller ID
If you are using more than one ISDN board simultaneously, select the board ID here (default is 1).

Set system time to ISDN time
Since ISDN transfers the exact system time when a call is made, you can select, to set your computer's time accordingly.

 Hints for use with X.25 and X.31 under CAPI 2.0

To use X.25/X.31 you need to set the ISDN options and to provide additional information with the phone number you want to call.

Connecting via X.25
For X.25 connections, please use the following ISDN settings: B1=64k-HLDC, B2=X75.SLP, B3=IS2808, Blocksize=128, Window=2.
To make a call, you supply the phone number and the X.25 host address separated by a bar character in the manual dial dialog or in the phone book, eg. 0711646464|4578545454.  If you do not supply the X.25 number, ZOC will expect to be connected to a default host.

Connecting via X.31
To make a call via X.31 (i.e. X.25 via ISDN D-Channel) use the following settings:  B1=64k-HLDC, B2=LAPD_X25, B3=IS2808, Blocksize=128, Window=2.
The destination to call consists a leading bar character, the X.25 host address and the TEI separated by a bar characters, eg. |02624578545454|1 If you do not supply a TEI ZOC will make the call with automatic TEI assignment.

Commands for the ZocDeviceControl script command

None.


About the Rlogin Device

The Rlogin device allows to access Rlogin servers over a LAN or over the internet.  You can connect to an Rlogin server by using host's name or IP address instead of a phone number (e.g. in the host directory). The username is taken from the username setting. If this is empty, ZOC uses the value from the USERNAME environment variable, or, if USERNAME is unavailable, "ZOC" is used as the username.  The escape character is hardcoded to be the tild character "~".

Commands for the ZocDeviceControl script command

None.


About the Secure Shell (SSH) Device

Introduction
The secure shell device allows you to login to an internet/intranet host.  Unlike using telnet, SSH uses encryption for all data sent and received which makes it impossible for third parties to tamper with or monitor the connection to obtain passwords or confidential data.

ZOC's impmentation of the Secure Shell protocol contains source code that was provided to public by the OpenSSH project.  You will find more information about OpenSSH on http://www.openssh.org.

Login
With SSH you need to provide a username and password or authentity file before calling the host.  When using a host directory entry to call a host via SSH, the username and password will be obtained from the corresponding fields in the phone book entry.  If you use File, Quick Connection, please provide username and password in the Manual Call dialog before pressing the OK button.

File Transfer
ZOC does not offer SCP file transfer.  However, most Linux and Unix hosts have a Zmodem implementation installed (you will first need to select the Zmodem protocol in ZOC's Options, Session Profile, Transfer).

To send a file from the remote host to ZOC simply type sz <filename>.  ZOC will then open the Zmodem download dialog and place the file into the download directory (Options, Program Settings, Directories).  To send a file to the remote machine, start ZOC's upload (Transfer menu).  ZOC will then first send an rz command to the host to start the remote receiver and will then do an upload.

Options
The device options for SSH allow you to select an encryption method to be used for the connection.  However, if the host does not support the selected encryption, the connection will fail.  Hence it is recommended to use 'Auto' which will cause the SSH device to negotiate an encryption method with the host (in which case you will get the best encryption supported by both sides).

As an additional security feature, ZOC's SSH implementation offers a function to check the remote host's encryption key with that of earlier sessions with that host, to detect possible "man in the middle" attacks. The list of known keys is stored in the files named known_hosts (for SSH V1) and known_hosts2 (for SSH V2) in the SSH directory in the directory where ZOC was installed.  These files are compatible with the respective files of various Unix implementations of SSH.

The 'Force protocol version 2' option enforces use of the newer and more secure version of the SSH protocol.  It is recommended to use SSH V2 whenever possible, however with that option on it will not be possible to connect to servers that only support SSH V1.

If you need port forwarding (tunneling) you can use the push button to define so called tunnel profiles.  These profiles allow you to build combinations of local and remote port numbers which will be forwarded to a host on the other side of the connection. You will then be able to select such a profile when making a SSH connection.

As an alternative to the username/password authentification, it is possible to use global authentification files.  Authentification files contain public and private keys and can be used to authenticate you when logging on to a host.  If you specify global authentification files, these will be used for all SSH connections.  This is useful if you use the same authentification file for all your hosts. Additionally you will be able to specify authentification files on a per connection basis (this can be done in the Quick Connect dialog or in the host directory).

The SSH devices adds three functions to ZOC's file menu:

Manage SSH keyfiles
This function lets you create authentification files to identify you with all hosts or per connection (see above text about global or per connection authentification files).

Manage SSH passphrases
The private part of your authentification files will be protected by a passphrase (usually a sentence used like a password).  If necessary, this function allows you to change the passphrases for your files.

Manage SSH tunnel profiles
Tunnel profiles are used to route data from a local port to a remote host or remote port to a local host through the secure SSH connection.  A profile consists of one or more specifications of port/host pairs and can be assigned to a connection (see above description).

Commands for the ZocDeviceControl script command
None.


About the Named-Pipe Device

The named pipe lets you access applications that provide a character based named pipe on your local machine or on a network server.  An example for such an application is OS2YOU (a remote-pc program).

To connect to a named pipe, make a manual or host directory call and provide the name of the pipe as a phone number.

To connect to a pipe on your local machine use \PIPE\<name>, eg. \PIPE\OS2YOU  To connect to a pipe on a LAN server use \\<server>\PIPE\<name>, eg. \\ZAPHOD\PIPE\OS2YOU

If you set the pipe to accept incoming calls (file menu), the caller must connect to \PIPE\ZOC

Under Windows incoming pipes are only supported under Windows NT.


About the Windows-Modem Device (Windows only)

This device allows you to use the modems drivers that are installed in your Windows control panel (so called Telephony API or TAPI modems).  ZOC's Windows-Modem option dialog shows a list of all installed modems in your system from which you can select the one you want to use.

If you own an ISDN board, you will probably also find ISDN style modems in this list.  If you have problems with these, you will find some helpful information in the common problems/questions section of this text.

Commands for the ZocDeviceControl script command

GETMODEMID <modemname>
Return a string that indicates the permanent modem id for a given modem (to use with the ZocSetDevParm command).

Example:
modem= "Microlink 33.6TS PnP"
id = ZocDeviceControl("GETMODEMID "||modem)
Call ZocSetDevParm "[7]"id"|0|1:"


Programming ZOC (REXX/DDE)

There are two methods of automating ZOC: REXX and DDE.  Both are described in the topics below.

REXX Programming
REXX Language Elements
Dynamic Data Exchange


Introduction to REXX

No time for reading, because you've got work to do?

This paragraph is for our ultra-impatient users (everybody else, please simply start reading 'About REXX'). First check out the documented samples in SCRIPT\RXSAMPLES\*.ZRX, then read REXX Reference and then browse through ZOC-REXX Commands.  Oh well, the paragraph 'General Issues' below might help a lot too ;-)

About REXX

The ZOC scripting language REXX has a long tradition, especially in the IBM world.  It is a rather simple but powerful language that is available on many platforms (OS/2, DOS, Windows 3.xx, Windows-NT, Amiga, IBM/390). One great benefit is the fact that it is a highly standardized interpreter language; hence programs written in REXX can run on any platform that offers a REXX implementation. The ZOC-REXX implementation for the Win32 platform is licensed from Enterprise Alternatives,Inc.  Their full product Enterprise REXX is fully compatible to IBM's OS/2 REXX implementation and the full product is available (and highly recommended) for all Windows platforms, including command line scripting as a batch file replacement. You can find details about contacting Enterprise Alternatives in ZOC's product info dialog and in the Contacting Enterprise Alternatives section of the Help text.

Learning REXX

Below you will find a introduction to the very basics of REXX.  You should read these topics and then continue either by reading REXX Reference and ZOC-REXX Commands or the printed ZOC-manual (see Help-Menu, Order-Form). Aside from that, you will find working samples in the SCRIPT\RXSAMPLE directory and you could take a look at the MINIHOST.ZRX program in the SCRIPT directory.  And, last but not least, searching the World-Wide-Web for the keyword REXX (eg. by use of Yahoo or AltaVista or by checking the links page at www.emtec.com) will lead you to a wealth of sources for REXX related information, including command references and tutorials.

If you want to use REXX on a sophisticated level, you can download the full REXX scripting help files from the ZOC BBS or Web page (see Where to get Updates).  These help files belong to Enterprise REXX which was licensed from is and is (C) by Enterprise Alternatives, Inc.  The filename is WREXXHLP.ZIP.  When reading the document, please ignore the parts that describe the Enterprise REXX extensions (because these were not licensed for use in ZOC).

General Issues

First of all, all REXX programs must begin with a comment.  REXX treats any text that is written between /* and */ as a comment.  This means that the first line in all REXX programs looks like this: /* REXX */

REXX knows native and non-native commands and functions.  Native commands are processed by the REXX interpreter itself, while non-native commands are passed to outside interpreters (so called adressees), three of which are CMD.EXE (under OS/2 and NT), COMMAND.COM (under DOS and Windows) and ZOC.EXE.  Examples for native commands are SAY, IF, DO, END.  Non-native commands are DEL, BACKUP, ZocAutodial, ZocDisconnect.  The list of ZOC commands can be found in ZOC-REXX Commands in the appendix.

How to Use Different Types of Commands

Native Commands
You can use native commands by writing the command name and the arguments like this:

/* REXX */
IF rc=640 THEN DO
    SAY "CALL FAILED"
END

ZOC-Commands
ZOC-commands are executed by means of REXX's subroutine call mechanismn. (Another style is still available for compatibility with elder ZOC versions, but the call style is more consistent with the REXX syntax and easier to use.)
For commands that do not return a result, this means that you use the CALL command with the name of the ZOC-command and the required arguments separated by commas.   In case of commands that do return a value, you use an assignment and supply the argument list enclosed in brackets after the command name:

/* REXX */

/* two commands without return values: */
CALL ZocBeep 2
CALL ZocConnect "555 6542"

/* a command that returns a value: */
answer= ZocAsk("What is your name")

Operating System Commands
System commands are sent to the operating system via REXX's native ADDRESS CMD command or via call to ZOC's ZocShell command:

/* REXX */
ADDRESS CMD "DEL FILE.TMP"
CALL ZocShell "DEL FILE.TMP"

Command Placement

In REXX programs, each command is normally written in it's own line. But more commands can share a line if they are separated by a semicolon. Commands can be continued in the next line if the last character in the line is an extra comma:

/* REXX */
SAY "Hello "; SAY "World"
SAY 4*5 + ,
    3*6

This works for native commands and for ZOC-commands.

Tracing

To find find errors in your REXX program (or to watch the program execution) you can insert a TRACE A command into your REXX program (normally this is done right after the initial comment). After that, the REXX interpreter will show you each step in the program as it executes it. TRACE I will show very detailed tracing and TRACE O turns tracing off.

Screen Input/Output

ZOC supports the REXX PULL and SAY commands which are redirected to the ZOC window.  However, texts printed using SAY are not scanned for control characters (like ^M) while texts printed with the ZOC commands ZocWrite and ZocWriteln are.

Further Topics

More detailed REXX programming topics like decisions, loops, operators, subroutines, etc. are covered in the REXX Language Elements.

A Small Example

Most of the time you will use REXX to log into a host and do things automatically for you.  Simple logins can be stored directly in the host directory (see Changing Host Directory Entries) and can be recorded automatically.

The example below calls a host and shows how to use REXX with ZOC. However, to demonstrate the language, this example is more complicated than it needs to be.  Normally a host would simply be connected by use of ZOCs ZocAutoConnect function (see ZOC-REXX Commands). More samples can be found in ZOC's script directory.

/* REXX script to dial (and retry) a phone number
  using a modems AT-Commands */

/* Ask user what number should be dialled */
number= ZocAsk("What number shall I dial?")

/* dial the number if it was non empty and if user
   did not press the ESC key */

IF number\="" & number\="##CANCEL##" THEN DO
   /* redial 5 times max. */
   DO TRY=1 TO 5

      SAY "Try #" TRY

      CALL ZocDial number

      /* wait for answer within 60 seconds */
      CALL ZocTimeout 60

      /* scan the next 6 lines for something interesting */
      DO LINE=1 TO 6
         /* receive next line of text */
         timeout= ZocGetLine()

         /* if timed out, end script with error */
         IF timeout=640 THEN SIGNAL ERROR

         /* if BUSY was received, try again (leave inner loop) */
         IF ZOCLASTLINE()="BUSY" THEN LEAVE LINE

         /* if NO CARRIER was received, end with error */
         IF ZOCLASTLINE()="NO CARRIER" THEN DO
            SAY "Error!"
            LEAVE TRY    /* leave outer loop (DO TRY=1 ...) */
         END

         /* if CARRIER or CONNECT was received, everythings ok */
         IF LEFT(ZOCLASTLINE(),7)="CONNECT" | ,
             LEFT(ZOCLASTLINE(),7)="CARRIER" THEN DO
            CALL ZocBeep 3  /* page user */
            LEAVE TRY    /* leave outer loop */
         END

      END LINE

      CALL ZOCDELAY 30 /* wait 30 seconds to dial next */

   END TRY

END /* IF */


REXX Language Elements

This appendix covers special topics regarding the native REXX control language.  A more general introduction can be found in REXX Programming. The ZOC communication commands for REXX are listed in ZOC-REXX Commands/Functions.  All the topics presented here are also demonstrated in the samples in ZOC's SCRIPT\RXSAMPLE\TUTORIAL directory.

The complete REXX reference for the Enterprise REXX product is available as a help file from the official ZOC online places, see Where to get Updates.  However, only the topics there that deal with the basic REXX language apply to ZOC (i.e. please ignore the sections of that document that deal with REXX-Extensions). (You can find details about contacting Enterprise Alternatives in ZOC's product info dialog menu and in the Contacting the Author section of the Help text.)

Command Placement
More than one command can be placed in one line by separating them by semicolons.  A command can be continued in the next line by placing an extra comma at the end of the line.

/* REXX */
SAY "Hello "; SAY "World"
CALL zoc "REQUEST", "What do you think", ,
     "Don't know", "Don't care"
answer= ZOCRESULT()

Numbers and Arithmetics
Numbers can be used for calculation, counting etc.  REXX uses numbers and the arithmetics in a pretty straightforward way:

/* REXX */
SAY 4*5+3*5 /* Output: 35 */
SAY 10/3    /* Output: 3.333333 */
SAY 10%3    /* Output: 3 (integral division) */
SAY 10//3   /* Output: 1 (division remainder) */
N= 4
SAY N       /* Output: 4 */
N= N+1
SAY N*3     /* Output: 15 */

Strings
REXX programs often process text in one way or another.  While REXX is able to deal with unqoted texts, it is generally better to put all text strings in single or double quotes:

/* REXX */
SAY "Hello World!"
SAY "Joe's Bar"
SAY 'He suggested: "Use ZOC!"'
SAY 'She replied: "That''s my program!"'

You can assign strings to variables, and you can concatenate strings and variables with the || operation:

/* REXX */
w= "World"
ex= "!"
SAY "Hello "||w||ex

Conditionals
To express conditions in REXX programs, the following conditional operators are used:

=  equal (numbers)
== exactly equal (strings)
<> not equal
\= not equal (same as <>)
<  less
>  more
<= less or equal
>= more or equal
&  AND
|  OR
\  NOT

Decisions
Decisions are made with the IF <condition> THEN DO <commands> END ELSE DO <commands> END sequence.  A typical program part using an IF command looks like this:

/* REXX */
IF rc=0 THEN DO
    SAY "OK"
END
ELSE DO
    SAY "FAILED"
END

The else part can be omitted if it is not needed.  The keywords DO and END can be omitted if only one command is to be executed conditionally.

Loops
Loops are expressed in the following manner:
DO <count> <commands> END
DO WHILE <condition> <commands> END
DO UNTIL <condition> <commands> END
DO <variable>=<start> TO <end> <commands> END

/* REXX */
DO 5
    SAY "Hello"
END

N= 100
DO WHILE n>0
    SAY n
    n= n-1
END

DO i=1 TO 10
    SAY i
END

Loops can be aborted by the LEAVE command.

Jumps and Procedures (Subroutines)
Jump targets (labels) and subroutines are marked with a name and a colon. To jump to a label, the SIGNAL command is used, while the CALL command is used to call a subroutine.  The following expample demonstrates a jump and a call to a subroutine with argument passing:

/* REXX */

PULL n

IF n=0 THEN
    SIGNAL get_out

SAY "10/"n" is "10/n
CALL square n

get_out:

EXIT

square:
    value= arg(1)
    sqr= value*value
    say "Sqare of "||value||" is "||sqr
    return

Function calls
Functions are marked and called like procedures.  The difference is that the can return a value to the calling command:

/* REXX */

SAY "Enter base"
PULL b
SAY "Enter power"
PULL p

result= power(b,p)
SAY "The " p "th power of " b " is " result

EXIT

power:
    base= arg(1)
    pow= arg(2)
    res= 1
    DO I=1 to pow
        res= res*base
    END
    return res

The PARSE command
PARSE is a powerful REXX command which can be used to split formatted strings in parts and assign the parts to variables.  The syntax is PARSE VALUE <string> WITH <variable>"<delimiter>"...  Eg. if you have a string coord in the form <index>: <pos-x>/<pos-y> you can easily break it in parts via PARSE VALUE coord WITH index": "posx"/"posy

/* REXX SAMPLE TO GET VALUES FROM A COMMA SEPARATED LIST */
x= "1, 2, 3, 4"

DO FOREVER
IF x=="" THEN LEAVE

    PARSE VALUE x WITH val", "rest

SAY val

x= rest
END

Issuing ZOC commands
ZOC commands are extensions to the REXX language which are implemented as procedures and functions (see ZOC-REXX Commands for a list).
ZOC commands that do not reutrn a value (or where you are not interested in the return value) are called with the procedure call syntax: CALL <cmd-name> <argument(s)>

ZOC-commands that do return a value are called with the function call syntax: <result-var>= <cmd-name>(<argument(s)>)

Issuing DOS, NT or OS/2 commands
Commands which are intended to be exectued by the operating system (like deleting or renaming files), must be addressed to the operating system directly.  This can either be done through REXX's ADDRESS CMD command or through ZOC's ZocShell command.

/* REXX */
ADDRESS CMD "DEL UPLOAD.TMP"
ZocShell "DEL UPLOAD.TMP"

Built-In Functions
The functions below can be used in assignments or in other commands that expect values, eg. b= ABS(a) or IF ABS(n)>10 THEN ....

Note: Only the most important functions and arguments are listed here, for a complete description please check the OS/2 REXX online help or the Enterprise-REXX help file for Windows (available from ZOC's support BBS or Web-Page).

ABS(<value>)
Absolute value (remove sign), eg. n=ABS(t)

ARG(<n>)
The n-th argument of a procedure/function.

COPIES(<str>,<repeat>)
Return <repeat> copies of <string>, eg. x=COPIES("-more- ", 10)

C2D(<char>)
Obtain the decimal ASCII value of a character (CHAR-TO-DECIMAL), eg. n=C2D('A') will set n to 65.

DATE("<style>")
Return the current date in different styles (one of B, D, E, L, M, N, O, S, U, W), eg. today=DATE("S") will return "19970201" on February 1st, 1997).

D2C(<ascii>)
Create the character from a given ASCII value (Decimal-To-Character), eg. SAY D2C(65) will print the letter A or cr= D2C(13) will assign the carriage return character to the variable CR.

FILESPEC(<part>, <filename>)
Cut a given part (one of "Drive", "Path", "Name") from a filename, eg. dir=FILESPEC("Path", ofile)

LEFT(<string>, <num>)
Return the first <num> characters from <string>, eg. SAY LEFT("BEERBOTTLE", 4) will print BEER.

LENGTH(<string>)
Return the number of characters in a string.

LINEIN(<filename>)
Read the next line of text from a file (see FILE I/O).

LINEOUT(<filename>, <text>)
Write a next line of text to a file (see FILE I/O).

POS(<needle>, <haystack>)
Find the first string in the second and return the position or 0 if not found.

RIGHT(<string>, <num>)
Return the last <num> characters from <string>, eg. SAY RIGHT("BEERBOTTLE", 6) will print BOTTLE.

STREAM(<filename>, ...)
Perform a file control operation (see the FILE I/O section below).

SUBSTR(<string>, <pos>[, <length>])
Return <lenght> characters from position <pos> in string.  <length> can be omitted and will return the rest of the string.

STRIP(<string>)
Remove leading and trailing blanks from a string eG. str= STRIP(str)

TIME("<style>")
Return the current time (style is one of C, H, L, M, N, S), eg. SAY TIME("N") will show the time in HH:MM:SS format.

TRANSLATE(<string>)
Translate the characters in a string to upper case.

TRUNC(<n>, <m>)
Cut the value <n> so that it has <m> decimal places.

X2C(<ascii>)
Create the character(s) from a given hex value (heX-To-Character), eg. SAY X2C(41) will print the letter A or crlf= X2C(0D0A) will assign the carriage return and line feed characters to the variable CRLF.

FILE I/O

Check if File Exists
IF STREAM(<filename>, "C", "QUERY EXISTS")\="" THEN ...

Open for Writing
CALL STREAM <filename>, "C", "OPEN WRITE"

Open for Reading
CALL STREAM <filename>, "C", "OPEN READ"

Write to File
CALL LINEOUT <filename>, <text>

Read from File
<variable>= LINEIN(<filename>)

Check End of File
IF STREAM(<filename>, "S")\="READY" THEN ...

Close File
CALL STREAM <filename>, "C", "CLOSE"

/* REXX FILE INPUT EXAMPLE */

file= "input.txt"

DO FOREVER
ln= LINEIN(file)
IF STREAM(file, "S")\="READY" THEN LEAVE

/* process line of file (ln) here */

END
CALL STREAM(file, "C", "CLOSE")

Please also check the FILEIO sample in SCRIPT\RXSAMPLE\TUTORIAL directory.

Parameters to REXX Scripts
It is possible to pass a parameter to a REXX scripts from the ZOC command line (or ZOC user buttons), e.g. ZOC "/RUN:script\test.zrx Hello,World" The parameter can be accessed via the ARG(1) function from within the REXX Script and if necessary be split using the PARSE command.  It is recommended to use the STRIP function to remove leading and trailing blanks.

/* PARAMETERS TO REXX */
p= ARG(1)
PARSE VALUE p WITH p1","p2
p1= STRIP(p1)
p2= STRIP(p2)
SAY "Parameters: ("||p||") ("||p1||") ("||p2||")"

Equivalents to BASIC Commands

ASC
D2C()

CHR$
C2D(), X2C()

CLOSE
STREAM(<file>, "C", "CLOSE")

EOF
STREAM(<file>, "S")\="READY"

FOR ... NEXT
DO n=<first> TO <last> ... END

INSTR$
POS()

MID$
SUBSTR()

LEN
LENGTH()

OPEN
STREAM(<file>, "C", "OPEN ...")

INPUT
PULL, ZocAsk()

INPUT#
LINEIN()

PRINT
SAY, ZocWrite, ZocWriteln

PRINT#
LINEOUT


Introduction to DDE

The Dynamic Data Exchange method (DDE) allows other programs to execute ZOC-commands remotely.  While REXX Programs must run under control of ZOC, it is possible to let separate applications (eg. ones written in C++) send requests to ZOC for processing.

In this introduction it is assumed that the reader knows about the basic concepts of DDE.  The topics below deal only with implementation specific details.

A more detailed description and a C sample application can be requested from EmTec.

Sessions/Topics
ZOC will accept only one session at a time.  The application identifier is ZOC and ZOC responds to the topics COMMUNICATION, COMM and COMM-DEBUG (the difference is, that the latter logs DDE events in the ZOC window to help debugging).  ZOC does not respond to general DDE-requests (ones that do not specify app or topic).
In addition to the application name ZOC, ZOC also responds to ZOCn, where n is a number that reflects the number of concurrently started ZOC instances.  The first one is called ZOC1, the next one reacts to ZOC2 etc.

Sending Commands
You can send commands to ZOC either via DDE_EXECUTE (data field) or DDE_REQUEST (item field).  DDE_EXECUTE always responds with an DDE_ACK message with a numeric return code in the AppRc field.  DDE_REQUEST always sends an DDE_DATA packet (even in case of error) with a result or the string ##ERROR## in the data field.  The DDE_DATA must not be acknowledged.  Under Windows the data handle must be freed by the receiver.

Serialization
Commands must be strictly sent on a command-reply basis.  ZOC does not handle nested commands (eg. sending another command while a ZocWait command is pending).

Command Format
DDE_EXECUTE and DDE_REQUEST accept the same form of commands.  (They differ in the fact, that EXECUTE cannot be used to retrieve return values from functions).  The commands must be zero terminated (C-style strings).
ZOC does not handle commands enclosed in square brackets (as recommended in the Microsoft DDE specification) and it does not handle multiple commands per message.  Unicode is not supported.
A command can be sent in the form <command> <arguments> or <command>(<arguments>).  The arguments can be separated by blank or comma.  However, the recommended style is with brackets and comma. String should be placed between quotation marks but it is legal to send them without if they do not contain special characters.
Here is a list of valid command strings.  For backward compatibility it is legal to omit the letters ZOC at the beginning of the command words.

ZocBeep(2)
ZocMsgBox("Hello World!", 2)
ZocNotify('File "FOOBAR.DATA" not found!')

ZocRequest "How's life?" "Fine" "Not Bad"
Notify Error
Beep 2

List of Commands
Via DDE you can use the same set of commands/functions as in REXX.  The list can be found in the ZOC-Command Reference in the appendix.

Example
The following code is a small example of how to start a DDE connection via Microsoft Access Basic, to initialize the modem and check if it returns "OK".

ZocDDE = DDEInitiate("ZOC", "Comm-Debug")
DDEExecute ZocDDE, "ZocCls"
DDEExecute ZocDDE, "ZocTimeout(60)"
DDEExecute ZocDDE, "ZocSend('ATZ^M')"
rc = DDERequest(ZocDDE, "ZocWait('OK')")
Debug.Print rc
DDETerminate ZocDDE


ZOC-REXX Functions for Communications

The list is found in the ZOC-Command Reference in the Appendix of this help text.


Updates, Author, Email, Orders, ...

The subtopics in this section are

o	Where/How to Order

o	How to Contact EmTec

o	How to Contact Enterprise Alternatives

o	Where to get Updates

o	Versions of ZOC

o	The ZOC Mailing List

o	About the Evaluation Version

o	Other Copyrights


Where/How to Order

General Information

The Order Form in the Help menu (or the Order item in the ZOC program group on your desktop) offers a convenient way to order ZOC.  It provides a list of distributors, their addresses, pricing calculation and lets you print or save your order.

You will also find all information necessary to order on http://www.emtec.com/zoc/order.html

Additionally, our U.S. distributor BMT Micro provides an instant purchase system on their web site http://www.bmtmicro.com (search for "ZOC").

License-Codes

When you order you will receive a license code which will let you unlock the evaluation versions (ie. which will remove the evaluation screens).  You can use this license code with versions of ZOC that were downloaded from our BBS or from the internet.  It will be valid for all platforms (Windows, OS/2) and for all versions with the same major version numbers (e.g. currently all 4.xx versions.)

Options

You can choose from the following options:

- 4.xx License
A license code (see above) for all 4.xx versions of ZOC.  (See also: version policy).

- Upgrade 3.xx to 4.xx
If you already own a ZOC 3.xx license, you can order a V4.xx license code at a reduced price.  However, you will need to provide your current support id with your order.

- Manual+CD
If you want, you can order a printed manual and a CD containing the current version of ZOC and ZOC related files. The commercial style printed manual provides basically the same information as the help file but adds introductory guidance to data communication and REXX programming.

Pricing

An automatic pricing table is available from the Order Form (to be found in the help menu). and on http://www.emtec.com/zoc/order.html

When you consider whether to buy ZOC, you should be aware that most commercial packages cost far more than ZOC and do neither offer free minor upgrades nor a multi platform license (if they are available an another platform at all).

Bulk Pricing, Site License

Attractive bulk discounts of up to 50% are available.  See http://www.emtec.com/zoc/order.html for more details

Payment

Payment options are also described in the Order Form (in the Help menu) and differ between distributors (usually major credit cards, checks, and money wires are accepted). If you have questions or special needs, please contact them for payment details.


Contacting EmTec

If you have a question about ordering, please select 'Order-Form' from the Help menu.  There you will find the list of distributors and ways to contact them.

If you have a question, or if something does not work, we are really willing to help. But please, pretty please, before writing an support email, check out Problems and Questions! If you do not find it there, feel free to contact us.  If you are a registered user, please provide your support id in the mail subject.

If you have an idea or suggestion an email is welcome too.

So, if you have complex technical problems, need development support or custom programming, have ideas or bug reports, need a site license, want to send a general comment or christmas presents please contact EmTec via

Internet eMail (preferred)

m.schmidt@emtec.com (general)
os2bugs@emtec.com (bugs in ZOC for OS/2)
winbugs@emtec.com (bugs in ZOC for Windows)

Fax
+49 911 7406857 (or 0911 7406857 from within Germany).

Phone
+49 911 7406856 (or 0911 7406856 from within Germany).

ZOC Support BBS
The phone number is +49 911 3781200 (or 0911 3781200 from within Germany). Login as ZOC.

Snail-Mail

EmTec
Markus Schmidt
Waagstr. 4
90762 Fuerth
- Germany -


Contacting Enterprise Alternatives

The REXX processor which you are using in ZOC is licensed from the company Enterprise Alternatives.  Enterprise REXX for Windows, WinREXX, allows you to use REXX as a scripting language for Windows NT, Windows 95 and also Windows 3.1.  The WinREXX product provides a REXX program source edit and execution window with menu selected options such as "REXX Syntax check" for development and "Execute with Trace" for debugging.  In addition to the standard REXX built-in functions, WinREXX also contains many Windows specific functions, for example to access the System Registry and to send electronic mail via MAPI.

Contact Enterprise Alternatives to order Enterprise REXX for Windows, or for additional information:

 Enterprise Alternatives
 635 South 16th Street
 San Jose, California 95112-2372
 USA

 408.293.3400 voice
 408.293.3474 FAX
 Enterprise@WinREXX.com
 www.WinREXX.com


The ZOC Mailing List

We now have an internet mailing list for ZOC.  Please visit http://www.emtec.com/common/mailinglist.html for more details.


Places to Find Updates

You will be able to find new versions of ZOC (zoc*.zip for the OS/2 version or zoc*.exe for the Windows platform) and related files in the following places:

WWW
http://www.emtec.com//zoc/index.html or
http://www.bmtmicro.com

FTP
ftp://ftp.emtec.com/zoc


About the Evaluation Version of ZOC

General

ZOC is a commercial software product which you can test before you buy it. The evaluation version is fully functional and you can use it for 30 days (more exactly: on 30 different days) to check if you like them and/or if it meets your requirements.  After that time you should either order it or delete it from your system.

Evaluation Mode

When the program displays the text evaluation mode in the window title bar it believes that you have not purchased a license for it. This can happen if you actually did not purchase it, because you are testing it. Or maybe someone installed it on your machine and did not tell you that you need to purchase a license (amazingly this happens quite often).  It also happens if you did purchase it but did not enter the license code that you received with the purchase or if you reinstalled your system.  If you are not sure what this evaluation business is all about or if you feel that the evaluation reminders are in error, please do not hesitate to contact us.

Restrictions in Evaluation Mode

There are no technical restrictions in evaluation mode, i.e. the evaluation version of ZOC is fully functional.  If something is not working the way you expect it, it is either by design, by misconfiguration or caused by a program bug.  We did not disable any functions and everything that has to do with the evaluation period is clearly marked so.  This mainly means messages and extra windows that appear to remind of of the programs' evaluation status.

Fairness

Please be aware that this is Fair-Ware.  The concept of giving away demo versions requires fairness from the user.  It sure is possible to use demo  programs eternally without paying for it, but, in the long run, this will hurt the users as bad as the software vendors.

If the concept fails to work, more and more programmers will sell their programs in shrink wrapped packages without giving the user the opportunity to legally test the program for some time (the list of programs that were changed this way already is quite long).


ZOC Versions

ZOC is a modem and telnet communication program that is available in different editions and on the platforms OS/2, Windows 95/98/ME and Windows NT/2000. The program files for OS/2 and the Windows platforms are different, but if you buy a software license code, it will be valid for all platforms.

To find out which ZOC edition you are using, please check the Product Information dialog in the Help menu.

ZOC/Pro
The ZOC/Pro edition is the full featured ZOC version which is available for a 30 days evaluation period (see below for ZOC/Pro Evaluation-Mode).

ZOC/Pro in Evaluation-Mode (all platforms)
This is the demo version of ZOC which you may evaluate for 30 days. No features are missing or disabled, but the order form is shown after each download to remind you that you should buy it after 30 days.

When you buy ZOC you will receive a software license code (valid on all platforms) and instructions how to use it to turn off Evaluation-Mode (ie. to remove the reminder after file transfers).  This will work for all ZOC updates with the same major version numbers, eg. all 3.xx version.

ZOC for Windows-NT/2000 and Windows 95/98/ME
ZOC for Windows NT/2000 and ZOC for Windows 95/98/ME are the same program. There are very few differences between ZOC running under NT/2000 and Win 95/98/ME (for example Win 95/98/ME does not allow ZOC to serve as a named pipe server), but in almost all practical matters ZOC behaves identical under NT/2000 and Win 95/98/ME (however, because of general stability, Windows NT or 2000 is recommended).  Windows versions of ZOC are made available as files named ZOW*.EXE

ZOC for OS/2
OS/2 was the platform for which ZOC was initially developed.  With Version 3.0 it was redesigned to support the Win32 platforms also.  The OS/2 and Windows NT versions are functionally identical except for a few minor functions that are mentioned in the help file.  OS/2 versions of ZOC are made available as files named ZOC*.ZIP

Version Policy
After the 4.00 release there will be a succession of ZOC version which will contain bug fixes and minor improvements (like adding a few options, making a dialog eaiser to use or adding a file transfer protocol or terminal emulation) until a point is reached, where the program runs reasonably smooth and solid. All these versions will have the same major version number and will hence be covered by the 4.xx software license code.  This point will probably be reached with a version number around V4.10.

After that, there might be an upgrade with major improvements that will eventually be released as version 5.00.  Users with a 4.xx license will then be offered an upgrade license at a reduced price (currently the 3.xx to 4.xx upgrade costs $20).


Other Copyrights

This software contains source code and program parts from the following sources (which is used in accordance with their respective software license):

CompuServe B
Copyright 1987-1989, CompuServe Incorporated, Columbus, Ohio

CRC Routines
UPDCRC macro derived from article Copyright (C) 1986 Stephen Satchell.

CRC-Table copyright (C) 1986 Gary S. Brown.

Encryption Code used in DEVSSH
Copyright (C) 1997 Eric Young (eay@cryptsoft.com). All rights reserved.

InfoZip/Install
Copyright (C) 1990-1992 Mark Adler, Richard B. Wales, Jean-loup Gailly, Kai Uwe Rommel and Igor Mandrichenko

explode.c -- Not copyrighted 1992 by Mark Adler

inflate.c -- Not copyrighted 1992-94 by Mark Adler

Rlogin
Copyright (C) 1983 Regents of the University of California.

Tapi
Copyright (C) 1995 Microsoft Corporation.  All Rights Reserved.

Zlib (gzip)
Copyright (C) 1995-1996 Jean-loup Gailly and Mark Adler

Zmodem
Original Version by Chuck Forsberg, Omen Technology Inc.


APPENDIX

o	Features You May Have Missed

o	Special Codes

o	VT102/VT220 Special Keys on the PC Keyboard

o	3270 Special Keys on the PC Keyboard

o	Key Names for ZocSendEmuKey/^KEY

o	Table of Control Characters and Power Codes

o	REXX Reference

o	ZOC REXX-Commands/Functions

o	Common Questions (How-To Guide)

o	Common Problems and Questions (Trouble Shooting Guide)


Features You May Have Missed

o	If you keep the mouse over one of the leds in the status bar for some time, a description of the led will appear.  This works for the buttons in the toolbar and userbar also.

o	Right mouse button on the toolbar opens the toolbar definition dialog.

o	Right mouse button on the userbar opens the userbar definition dialog.

o	Right mouse button on the status bar, opens a popup menu of all options menu choices (OS/2 version only).

o	Right mouse button on the main window opens a popup menu.

o	With the Alt key pressed you can mark rectangular parts of the screen.

o	Marking one line of text with the mouse while holding the Shift key down, sends that text immediately.

o	Paste-Quoting text with the Ctrl key pressed, reformats the text to fit the screen width.

o	Right mouse button in the host directory opens a popup menu.

o	The quick access option in the host directory's entry edit dialog, puts phone entries into the File menu.

o	The minimize/maximize buttons in the phone dial window switch between a small and large version of that window (also available from host directory dialog options).

o	The snippets window (Options, Window) captures useful stuff (like file names, internet adresses, etc.) for you.

o	The Local Typing field (Alt+C) has a history (cursor up/down).

o	The keymap dialog allows different mappings for keys according to the state of the scroll-lock key.  This way you could create totally different keyboards and switch between them by use of scroll-lock.


Function Shortcuts

See also:
Keyboard Redefinition
Keys for the VT102/VT220 Emulation
Keys for the 3270 Emulation
Keys for the 5250 Emulation
Emulation Dependent Key Names

Key	Function
PgUp	Upload
Ctrl+PgUp	ASCII Upload
PgDn	Download
Shift+Insert	Edit, Paste
Alt+Insert	Edit, Paste (no line breaks)
Ctrl+End	File, Send Break
Alt+B	Logging, Scrollback
Alt+C	Show/Hide Chat
Alt+D	File, Host Directory
Alt+E	Misc, Editor
Alt+H	File, Disconnect
Alt+J	Transfer, Transfer-Shell
Alt+L	Logging, Open/Close
Alt+M	File, Quick Connection
Alt+N	File, Call Next
Alt+P	Logfile, Log To Printer
Alt+Q	Edit, Paste Quoted
Alt+S	Options, Session Profile
Alt+X	End Program
Alt+Y	Enable/Disable Split Chat
Alt+Z	Misc, Clear Screen
Alt +	Start Script
Alt -	Stop Script
Alt ,	Show/Hide Snippets window
Alt #	Misc, Clear Screen
Alt /	Misc, Shell
Alt *	Edit Print Clipboard


VT102/VT220 Special Keys on the PC Keyboard

Basic VT220 Keys

VT220 Key	PC Key
[F1]...[F4]	not available
[PF1]...[PF4]	[F1]...[F4]
[F5]...[F10]	[F5]...[F10]
[F11]/[F12]	[F11]/[F12] or Shift+[F1]/[F2]
[F13]...[F20]	Shift+[F3]...[F10]
[Insert Here]	[Ins]
[Remove]	[Del]
[Select]	[Home]
[Find]	[End]
[Prev Screen]	[PgUp]
[Next Screen]	[PgDown]

VT102/VT220 Auxiliary Keypad

VT102 Keypad	PC Numeric Keypad (Num Lock Off)
[PF1]	[F1]
[PF2]	[F2]
[PF3]	[F3]
[PF4]	[F4]
[0] ... [9]	[0] ... [9]
[Enter]	[Enter]
[.]	[./Del]
[-]	[-]
[,]	[+]

These and other VTxxx keys can be mapped to user buttons (Options, Session Profile) or other keyboard keys (Options, Keymap) by using symbolic names for the keys.  They can also be sent from Rexx through the ZocSetEmuKey command. See Emulation Dependent Key Names.


IBM 3270 Special Keys on the PC Keyboard

3270 Key	PC Key
[PF1]...[PF12]	[F1]...[F12]
[PF13]...[PF24]	Shift+[F1]...[F12]
[Left2]	Shift+[Left]
[Right2]	Shift+[Right]
[PF7]/[PF8]	[PgUp]/[PgDown]
[Newline]	[Return]
[Enter]	[Right Ctrl]
[Reset]	[Left Ctrl] or [Esc]
[Clear]	Shift+[Esc]
[PA1]...[PA3]	Shift+[1]...[3]
[EraseEOF]	Ctrl+[End]
These and other IBM 3270 keys can be mapped to user buttons (Options, Session Profile) or other keyboard keys (Options, Keymap) by using symbolic names for the keys.  They can also be sent from Rexx through the ZocSetEmuKey command. See Emulation Dependent Key Names.


IBM 5250 Special Keys on the PC Keyboard

5250 Key	PC Key
[PF1]...[PF12]	[F1]...[F12]
[PF13]...[PF24]	[Shift+F1]...[Shift+F12]
[Newline]	[Right Ctrl] or [Shift+Enter]
[Field Exit]	[Keypad-Enter]
[Enter]	[Enter] row.

Some 5250 emulators allow access to special keys via a Esc key combination.  ZOC uses Esc for the Reset function, but the Esc combinations are available if your remap the Esc key in Options, Keyboard Profiles with the emulation dependent key name EscapeMenu.  With this configuration you will be able to type two key sequences as shown below (e.g. Esc A will simulate the Attention key.).  However, it will probably be more convenient to remap the required keys directly to a PC keyboard key in the Options, Keyboard Profile and Emulation Dependent Key Names

1 = F1
2 = F2
3 = F3
4 = F4
5 = F5
6 = F6
7 = F7
8 = F8
9 = F9
0 = F10
- = F11
= = F12
! = F13
@ = F14
# = F15
$ = F16
% = F17
^ = F18
& = F19
* = F20
( = F21
: = F22
_ = F23
+ = F24
A = Attention
D = Duplicate
H = Help
I = Insert
L = Refresh
M = Fieldminus
P = Print
R = Reset
S = Sysreq
X = Fieldexit

These and other IBM 5250 keys can be mapped to user buttons (Options, Session Profile) or other keyboard keys (Options, Keymap) by using symbolic names for the keys.  They can also be sent from Rexx through the ZocSetEmuKey command. See Emulation Dependent Key Names.


Key Names for ZocSendEmuKey/^KEY

The following names can be used to simulate keystrokes from user buttons, for keyboard remapping and for the ZocSendEmuKey REXX command. (Please be aware that these names will only be valid while the corresponding emulation is selected).

E.g. when the VT220 emulation is active, you can remap Ctrl+I as the insert key by going to Options, Keymap. Then select Ctrl+I, click the More Functions button and remap it as Insert with type name of an emulation key In REXX you could use Call ZocSendEmuKey "Insert" command to simulate the Insert key during script processing.

VT102/VT220:
Esc, Pf1, Pf2, Pf3, Pf4, F5, F6, ... F20, Help (same as F15), Do (same as F16), Find, Insert, Remove, Select, Prev, Next, Aux0, Aux1, Aux2, Aux3, Aux4, Aux5, Aux6, Aux7, Aux8, Aux9, AuxDot, AuxMinus, AuxPlus, AuxEnter, Enter, Crlf, Tab, Backspace, Del, Up, Down, Right, Left, ModUp, ModDown, ModRight, ModLeft.

Linux:
Esc, Up, Down, Right, Left, Home, End, Insert, Enter, Return, Backspace, Del, Delete, PgUp, PgDown, Tab, BackTab, F1, F2, ..., F20.

IBM 3270:
Insert, Enter, Tab, BackTab, Reset, Home, Left, Left2, Right, Right2, Up, Down, NewLine, Pa1, Pa2, Pa3, Clear, EraseEOF, Delete, MonoCase, Dup, FieldMark, SysReq, EraseInput, Pf1, Pf2, ... Pf24.

IBM 5250:
Attn, Backspace, BackDel, Delete, Duplicate, Erase, End, Enter, FieldExit, FieldMinus, FieldPlus, Home, Help, Insert, Newline, RollDown, RollUp, Refresh, Reset, SysReq, F1, F2, ... F24.

Sun CDE:
Same as VT220 but use KF1-KF4 instead of PF1-PF4.

ANSI BBS:
Esc, Up, Down, Right, Left, Home, End, Insert, Enter, Return, Backspace, Del.

ANSI SCO:
Esc, Up, Down, Right, Left, Home, End, Insert, Enter, Return, Backspace, Del, Delete, PgUp, PgDown, F1, F2, ..., F24.


Special Codes (Ctrl-Characters & Power Codes)

Sometimes it is necessary to send characters that are not available from the keyboard or that cannot be entered into a field because the operating system uses it to move the cursor (like the ESC or Enter key).

ZOC offers Control Sequences that are replaced with keys that would not be available otherwise.  However, these characters can also be entered by entering it's ascii code value on the numeric keypad while holding the Alt key pressed.

ZOC also offers special Power Codes that give you access to values like current time or date or let you map action (like running a REXX program or calling a host) to power fields like function keys or AutoMacros.

Control Codes:

The codes listed here can be used to send equivalents of keys that can not be entered otherwise (eg. when mapping F-Keys etc.).

Key	Control Code	Alt+Code
^ char	^^
Beep	^G	Alt+007
Backspace	^H	Alt+008
Tab	^I	Alt+009
Esc	^[	Alt+027
Enter (Newline in 3270/5250)	^M	Alt+013
Line Feed	^J
Send Data (IBM 3270/5250 only)	^Z
Ctrl+^ (dec 30)	^~	Alt+030
Others Hex-xx	^(xx) where xx is a 2-digit hex code from 00 to FF

Power Codes:

The table below lists place holders that can be used in ZOC power fields (like F-Macros) to send special values or achieve magical effects like starting REXX scripts or connect to hosts.

All fields that can accept power codes have a button with a yellow flash next to them which, when pressed, starts the power code assistant.

Code	Explanation
^&	Replaced with the password from the host directory entry that is currently online (for safety reasons this works only once per session).
^%	Replaced with the username from the host directory entry that is currently online
~	Delay of 1/3 second (only available in modem strings)
^#	Replaced with the phone number (only available in modem dial strings)
^!	Send a break
^RUN=	Run the REXX file that is given after the equal sign (available in F-Macros, Custom Buttons and AutoReplies).
^CALL=	Call one or more hosts (separated by vertical bars) from the host directory which are listed after the equal sign (e.g. ^CALL=ZOC InfoBBS|Big Blue/2|CompuServe)
^CONNECT=<device>!<number/address>	Try to connect to a given phone number, internet address etc. by means of a given device (device name as in Options, Session Profile).  This function is different from ^CALL= in the fact that it does not require a host directory entry. If the device is SSH (Secure Shell) you can supply username and password with the host address like this: <username>:<password>@<host>. For the RLOGIN device you can use <username>@<host>. Examples: ^CONNECT=TELNET!compuserve.com, ^CONNECT=SSH!joedoe:secret@secure.server.com
^KEY=n	Simulates a single special key that is specific to an emulation (e.g. f-keys, see Key Names Appendix).
^SHELL=	Starts an OS/2, DOS or NT command (e.g. ^SHELL=COPY NEW.DATA SAVE.DATA) from a F-Key, Custom Button or AutoReply. To start more than one command, separate them by an & (e.g. ^SHELL=cd \tmp & del *.tmp).
^EXEC=	Starts an OS/2, DOS or NT command (e.g. ^EXEC=NOTEPAD.EXE).  Unlike the Shell command, the program is invoked directly (without the command processor) which means that no command arguments can be supplied.
^XFER=	OS/2 only: Starts an OS/2 command in a transfer shell (e.g. ^XFERSHELL=CKERMIT -l %ZOCHFC% -r, see Transfer Shell) from a F-Key, Custom Button or AutoReply. To start more than one command, separate them by an & (e.g. ^XFERSHELL=CD \M2ZMODEM & M2ZMODEM -u %ZOCHFC% -r DOWNLOAD).
^DOSXFER=	Starts a DOS command in a transfer shell (e.g. ^DOSXFER=DSZ port 2 rz) from a F-Key, Custom Button or AutoReply.  See Transfer DOS-Shell for more details.
^1	Replaced with current day of month
^2	Replaced with current month
^3	Replaced with current year
^4	Replaced with current hour
^5	Replaced with current minute
^6	Replaced with current second
^8	The instance number of the currently open ZOC window (to prevent multiple instances from using the same file)


ZOC-REXX Commands/Functions

The names of ZOC commands always begin with "ZOC" and for many it is necessary to provide one or more arguments.

Generally there are two types of ZOC-commands: Commands that return a value (these are also called Functions) and commands that don't.

ZOC-commands that do not return a value are called with the procedure call syntax: CALL <cmd-name> <arguments>

Functions are called with the function call syntax: <result-var>= <cmd-name>(<arguments>)

However, it is possible to call functions (commands which return values) with the procedure style call if you are not interested in the result code; in other words, CALL ZocDownload "ZMODEM", "\FILES\DOWNLOAD" and error= ZocDownload("ZMODEM", "\FILES\DOWNLOAD") are both legal.

In the list below, functions are indicated by the use of brackets.

ZocAsk([<title> [, <default>]])
Show a text input window and read text from user.  If the second argument (<default>) it is provided, the entry field will be preset with this value.

Example:
answer= ZocAsk("Are You sure?", "No")
IF answer="No" THEN ...

ZocAskP([<title>])
Same as the ZocAsk command, except that the entry field is protected (typed characters are shown as asterisks) and that you cannot preset the field.

Example:
pw= ZocAskP("What's your password?")
IF pw="secret" THEN ...

ZocAutoConnect <name>
Makes a call to an entry in the host directory.  The entry should not have an AutoLogin REXX file assigned to it.

Example:
CALL ZocAutoConnect "ZOC-BBS"

ZocBaud <baud>-[7|8N|O|E1|2]
Set serial parameters (SERIAL/MODEM device only).  For other devices see the ZocSetDevParm command.

Example:
CALL ZocBaud "38400-8N1"

ZocBeep [<n>]
Beep n times.

Example:
CALL ZocBeep 2

ZocCls
Clear the screen.  Same as ZocCommand("CLS").

Example:
CALL ZocCls

ZocCommand <subcommand>
Performs a ZOC function.  Valid subcommands are

CLS
Clear screen.

CANCELCONNECT
Cancel a connect request that is currently in progress.

CLEARSCROLLBACK
Clear scrollback buffer.

DISCONNECT
Terminate current connection.

SENDBREAK
Sends a modem break signal (Serial/Modem device only).

Example:
CALL ZocCommand "DISCONNECT"

ZocConnect [<number>]
Connect to a host or read the number to connect to from the user if the parameter is omitted.

Example:
CALL ZocConnect "011 49 911 3781200"

Note: If you are calling an entry from the host directory and want ZOC to maintain the call/last-call fields, you can add the name of the BBS (exactly written as in the host directory) to the phone number after a TAB character (via REXX's D2C(9) function) like this:

Example:
CALL ZocConnect "011 49 911 3781200"||D2C(9)||"ZOC Support BBS"

However, it would be more convenient to use the ZocAutoConnect command.

ZocCtrlString(<text>)
This function converts a text (which typically contains control codes) into a string.  The most common use for this function is to obtain the password of the current session from the host directory via ^& control code.

ZocDelay [<sec>]
Wait a given time in seconds or wait 0.2 seconds if the parameter is omitted.

Example:
CALL ZocDelay 4.8

ZocDeviceControl <string>
This command executes a device specific command (e.g. to return the signal states of the COM port).  See the individual devices for more info.

Example:
state= ZocDeviceControl("GETSTATE")

ZocDisconnect
Disconnect current connection.  Same as ZocCommand("DISCONNECT").

Example:
CALL ZocDisconnect

ZocDownload(<protocol>[:<options>], <file or dir>)
Download one or more files using a file transfer protocol.  The first parameter is the name of a file transfer protocol (as listed in ZOC's Options, Transfer dialog).  The second parameter is a filename for Xmodem and a directory to store the received file(s) for Ymodem and Zmodem.  For a discussion of the protocol options, please see the ZocUpload command further down in this  list. This function returns the string ##OK## or ##ERROR##

Example:
result= ZocDownload("ZMODEM", "C:\ZOC\INFILES")
IF result="##ERROR##" THEN DO
    CALL ZocBeep 5
    SAY "DOWNLOAD FAILED"
END

Note: If you have Auto-Transfer enabled in the Transfer Options, and if the remote host starts the transfer before ZOC-REXX processes the ZocDownload command, then two download windows will come up.  So make sure you are issuing ZocDownload() before the host starts or make sure that Auto-Transfer is disabled.

Note: If the file has a name that is set for download to the alternate path (in Options, Transfer), the directory parameter is ignored.

ZocDoString(<commandstring>)
Pass a powercode style string (like the ones mapped to keys, buttons, etc.) to ZOC for processing.

Example:
CALL ZocDoString "^EXEC=notepad.exe"

ZocExec <command>, [<viewmode>]
Execute a program directly (ie. without passing it through the shell handler, thus avoiding the black shell window).  This does only work for .com and .exe files (not for .cmd and internal commands like DEL, REN etc.).
The optional viewmode parameter controls how the application window is shown: 0= normal, 1= hidden, 2= minimized, 3= maximized.
ZocExec also returns the exit code of the application.

Example:
CALL ZocExec "notepad.exe"

See also: ZocShell

ZocFileDelete(<filename>)
Deletes a file from disk.  Filename may not contain wildcards (* or ?). Function returns ##OK## or ##ERROR##
See also: ZocShell

ZocFileRename(<oldname>, <newname>)
Renames a file.  Filenames may not contain wildcards (* or ?). Unlike the Shell's REN command, the new name can be in a different directory or even on a different drive. Function returns ##OK## or ##ERROR##
See also: ZocShell

ZocGetFilename(<title> [, <default>])
Display a file selection window and return the filename.  If the file requester is cancelled, the string ##CANCEL## is returned.

Example:
file= ZocGetFilename("Select file to upload", "*.ZIP")
IF file\="##CANCEL##" THEN DO
    CALL ZocUpload "ZMODEM", file
END

ZocGetFilenames(<title> [, <default> [, <delimiter>]])
Display a multiple file selection window and return the filenames separated by space characters.  If the file requester is cancelled, the string ##CANCEL## is returned.  The items can be retrieved from the list by the REXX WORD() function.  If you expect filenames to contain space characters, you need to supply a delimiter and use the ZocString("PART", ...) function to extract the names

Example:
files= ZocGetFilenames("Select file to process", "*.ZIP", "|")
i= 1
DO FOREVER
name= ZocString("PART", files, i, "|")
IF NAME=="##NULL##" THEN LEAVE

SAY i||". NAME= "||name

i= i+1
    ...
END

ZocGetInfo(<item>)
This function returns information about the current ZOC session. Items:

COMHANDLE
The file handle which ZOC uses to access the com port or ##NULL## (when not using a com port). This handle can be passed to external programs (like CKERMIT or FaxWorks) who can access the com port directly.

CONNECTEDTO
The host or phone number to which we are connected.

CURSOR-X
The x-position of the cursor (starting with zero).

CURSOR-Y
The y-position of the cursor (starting with zero).

DOWNLOADDIR
The default drive and directory for downloads.

EXEDIR
The drive and directory in which ZOC has been installed.

ONLINE
Information if ZOC is currently connected to a host: ##YES##,  ##NO##, ##UNKNOWN##

OSYS
Returns a string which indicates the operating system and OS version under which ZOC is running.  The string returned is in the form "<osys> <version>" where <osys> is OS2 or WINNT or WIN95. <version> is a three digit number eg. 400 for Windows NT 4.0 or 230 for OS/2 Warp (Warp sees itself as OS/2 V2.30).  Windows 95 returns WIN95 400

PROCESSID
ZOC's system process id.

TRANSFER
Information if a file transfer is currently active: ##YES##,  ##NO##

UPLOADDIR
The default drive and directory for uploads.

VERSION
The current ZOC version, e.g. 3.05

WORKDIR
ZOC's working directory (containing host directory, options, etc).

Example:
CALL ZocTimeout 30
timeout= ZocWait("Password")
IF timeout=640 | ZocGetInfo("ONLINE")<>"##YES##" THEN DO
    SIGNAL PANIC /* disconnected! */
END

ZocGetLine()
Wait for the next non empty line of text from the modem (if you want to wait for the next line, no matter if empty or not, use ZocWait "^M"). The received text is available using the ZocLastLine() function. If ZocGetLine times out, it returns a value of 640.

Note: Since REXX is running in an extra thread, it is possible that (especially in loops) ZocGetLine will miss lines if the text is coming in very fast (see ZocSyncTime command below).

Example:
rc= ZocGetLine()
IF rc\=640 & ZocLastLine()="CONNECT" THEN ...

ZocGetOption(<key>)
Retrieves the key-value pair (see ZocSetOption command) for a ZOC session option.

Example:
pair= ZocGetOption("Beep")
PARSE VALUE pair WITH key"="value
IF value="no" THEN DO
    SAY "THE BEEP OPTION IS TURNED OFF"
END

Example:
pair= ZocGetOption("MdmIni")
PARSE VALUE pair WITH key'="'value'"'
SAY "THE MODEM INIT STRING IS: "value

ZocGetProgramOption(<key>)
Retrieves the key-value pair for a ZOC program option (see also ZocGetOption and ZocSetGlobalOption).

Example:
pair= ZocGetProgramOption("DisconEndProg")
PARSE VALUE pair WITH key"="value
IF value="yes" THEN DO
    SAY "ZOC WILL TERMINATE AFTER THIS SESSION"
END

ZocGetHostEntry(<name>, <key>)
Retrieves the key-value pair (see ZocSetHostEntry or ZocSetOption command) for a ZOC host directory entry.

Example:
pair= ZocGetHostEntry("ZOC Support BBS", "number")
PARSE VALUE pair WITH key'="'value'"'
CALL ZocConnect value

ZocGetScreen(<x>,<y>,<len>)
The ZocGetScreen() function can be used to return characters that are currently displayed in ZOC's terminal window.   It returns <len> (255 max.) characters beginning from position <x>,<y> (zero based) and, at the right margin, skipping to the next line without adding a CR or LF.

Example:
line= ZocGetScreen(0,0, 80)
IF POS("*", line)=0 THEN DO
    SAY "THERE'S NO * IN THE FIRST LINE"
END

ZocKeyboard(<command>)
This function allows a REXX script to read keystrokes from the terminal window.  It supports the subcommands LOCK, UNLOCK and GETNEXTKEY.
GETNEXTKEY returns a string in the form char|scancode|shift|ctrl|alt.
char two byte hex number representing the ascii code of the key.
scancode is the phyiscal scan code from the keyboard (the scan code can be used to identify functional keys such home, del, f1, f2, etc.).
shift, ctrl and alt are either 0 or 1 depending on if they were down when the key was pressed.
The example below shows how the result is split into its parts and displays the result in a user friendly form.

Example:
result= ZocKeyboard("GETNEXTKEY")
PARSE VALUE result WITH hexkey"|"scan"|"shift"|"ctrl"|"alt
key= x2c(hexkey)
SAY "You pressed hex/key: "hexkey"/"key
SAY "Scan code: "scan
SAY "Shift/Ctrl/Alt states: "shift"/"ctrl"/"alt

ZocLastLine()
This is a function and returns the current line of text when the last ZocWait/ZocWaitMux/ZocGetLine command was satisfied.

Example:
CALL ZocSend "ATZ^M"
timeout= ZocGetLine()
IF timeout\=640 & ZocLastLine()="OK" THEN DO
    Call ZocConnect "555 3456"
END

ZocListFiles(<path\mask>, [<separator>])
The ZocListFiles function will retrieve a list of filenames for a directory. The first parameter is a directory name and wildcard mask (e.g. "c:\data\*.*").  The function will return a string which contains the number of files and the file names separated by space characters, e.g. "3 download.zip sales.txt foobar.fil".
This allows easy access to the parts of the string via REXX's WORD function (see example below).  However, if you expect filenames to contain space characters you will have to choose a different file list separator as the second parameter. E.g. separator of ";" will return "3 download.zip;sales.txt;foobar.fil".  In this case you can use ZocString("PART", purelist, i, ";") to extract the file names.
Note: The number of filenames returned is limited to 128 and the maximum length of the string returned is 4096.

Example:
files= ZocListFiles("C:\TEMP\*")

howmany= WORD(files, 1)
SAY "Number of Files:" howmany

purelist= SUBSTR(files, LENGTH(howmany)+2)
DO i=1 TO howmany
    SAY "File " i "=" WORD(purelist, i+1)
END

ZocLoadOpts <optsfile>
Load session profile file.

Example:
CALL ZocLoadOpts "OPTIONS\VT102OPT.ZOC"

ZocLoadKeyfile [<keyfile>]
Load an key definition (*.zky) file.

Example:
CALL ZocLoadKeyfile "OPTIONS\ALTERNATE.ZKY"

ZocLogname <filename>
Set new name for logging.

Example:
CALL ZocLogname "TODAY.LOG"

ZocLogging 0|1 [,1]
Suspend/resume logging.  If a second parameter with value 1 is given, ZocLogging will suppress the notification window.

Example:
CALL ZocLogging 1

ZocMsgBox(<text> [, <mode>])
Display a message box.  Normally an informational message window with an OK button (mode 0) is shown.  Mode 1 shows an error message with an OK button and mode 2 shows a message with a YES and NO button.  The returned value is either ##OK##, ##YES## or ##NO##.

Example:
CALL ZocMsgBox "Connect Failed!", 1
result= ZocMsgBox("Try again?", 2)
IF result="##YES##" THEN DO
   ...
END

ZocNotify <text>
Display message window.

Example:
CALL ZocNotify "Hello World!"

ZocPlaySound <file>
Plays a .WAV file.

ZocReceiveBuf(<buffer size>)
This function makes ZOC collect parts of a session in a memory buffer and returns the previous buffer's contents (if any) as a string.
Initially the buffer has a size of zero, which means that no data is collected.  To start data collection you need to call the function with the size of a receive buffer.   After that the incoming data is collected until the buffer is full or until the function is called again (which will retrieve the buffer contents, empty the buffer and set a new size).
A typical call sequence to use ZocReceiveBuf() to retrieve text from a database might look like this:

Example:
/* make a receive buffer of 256 bytes */
CALL ZocTimeout 60
CALL ZocReceiveBuf 256
CALL ZocSend "read abstract^M"
CALL ZocWait "$"

/* get the description and make a */
/* larger buffer to continue with */
abst= ZocReceiveBuf(4096)
CALL ZocSend "read contents^M"
CALL ZocWait "$"

/* get the contents and discontinue buffering */
cont= ZocReceiveBuf(0)

Note: In the example above, both variables (abst and cont) will start with the word "read" and end with the character "$" with whatever was received in between.

Note: If executed via DDE, the command must be sent as a DdeRequest (rather then DdeExecute)

Note: See also ZocWaitForSeq.

ZocRequest(<title>, <opt1> [, <opt2> [, <opt3>]])
Display a requester window with options and return a string with the selected option .

Example:
answer= ZocRequest("What do you want?", "Milk", "Honey")
IF answer="Milk" THEN DO
    ...
END

ZocRequestList(<title>, <opt1>, [, ...]])
Display a requester window with a list of options and return the index of the selected option (or -1 for Cancel).  If only one option is passed to the function, it is considered as a list of choices separated by vertical bars.

Example:
answer= ZocRequestList("Please select!", "Beer", "Wine", "Whiskey", "Liquor")
IF answer=3 THEN DO
    ...
END

answer= ZocRequestList("Please select!", "Beer|Wine|Whiskey|Liquor")
IF answer=3 THEN DO
    ...
END

ZocRespond <text1> [<text2>]
Send <text2> whenever <text1> is received during (and only during) a ZocDelay or ZocWait command.  A maximum of 32 Respond commands can be active simultaneously.  <text1> must not contain carriage returns or line feeds. If <text2> is omitted or empty the Respond command for <text1> is cancelled.

Note: This command uses a few extra CPU cycles, therefore you should cancel unused replies as soon as you don't need them any more.

Example:
/* Wait for 'Command' and
skip all prompts in between */
CALL ZocRespond "Enter", "^M"
CALL ZocRespond "More", "^M"
timeout= ZocWait("Command")
CALL ZocRespond "Enter"
CALL ZocRespond "More"

The above example waits until the text Command is received.  While waiting, all Enter and More prompts are answered automatically by sending ^M.  After the Wait is satisfied, the respond commands are cancelled.

ZocSaveOpts [<optsfile>]
Save the current session profile to file.  If the file name parameter is omitted, ZOC will ask the user for a filename

Example:
CALL ZocSaveOpts "OPTIONS\VT102OPT.ZOC"

ZocSend <text>
Send text to modem (or any other device).  If text contains control codes (e.g. ^M for Enter) these are replaced with their real values (see Control Codes).
In the 3270 and 5250 emulation, the text is processed as keystrokes rather than sending it directly through the communication channel.
In these emulations ^M is interpreted as Newline/FieldExit, ^I as Tab and ^Z als Send-Data/Enter.
See also: ZocSendRaw, ZocSendEmulationKey.

Example:
CALL ZocSend "JOE USER^M"
 /* send JOE USER<enter>*/

Example:
/* 3270/5250 example */
CALL ZocSend "JoeDoe"
CALL ZocSendEmulationKey "NewLine"
CALL ZocSend "Elm Street"
CALL ZocSendEmulationKey "Enter"

/* 3270/5250 same as above */
CALL ZocSend "JoeDoe^MElm Street^Z"

ZocSendRaw <datastring>
This command sends the data from datastring in untranslated form.  This is useful if you want to send binary data to a host.  For example, if you want to send 42 01 00 05 41 43 (hex) through the device, you can do this as

Example:
CALL ZocSendRaw "B"||X2C(01)||X2C(00)||X2C(05)||"AC"
CALL ZocSend "B^A^@^EAC" /* same using ZocSend */

ZocSendEmulationKey <keyname>
Send the code that represents a special key in a certain terminal emulation, e.g. a f17 from a VT220 emulation.  This command is only available in the VTxxx, ANSI and 3270 emulations (and only if these are currently enabled).  The key names are described in the Key Names Appendix.

Example:
CALL ZocSendEmulationKey "f17" /* Send a VT220 F17 key */

ZocSetAutoAccept 1|0
Make the device accept incoming calls.

Example:
CALL ZocSetAutoAccept 1 /* accept calls */

ZocSetDevice <name> [,<devparm-string>]
Change the device.  The name must be one of the names available in Options, Session Profile, Device, Devices.  The optional devparm-string contains options with which the device should be initialized (see ZocSetDevParm below for information about how to obtain a devparm-string). If the device parameters are omitted, ZOC uses the paramters which are currently set for that device.

Example:
CALL ZocSetDevice "TELNET"
CALL ZocConnect "bbs.channel1.com"

Example:
CALL ZocSetDevice "SERIAL/MODEM", "[1]COM3:57600-8N1|9|350"

ZocSetDevParm <string>
This is a rather advanced command which allows to change the device dependent options.  However, the options strings for the device are not standardized which means that, in order to find a certain parameter string, you need to set the options manually and then query the device's parameter string by pressing Shift+Ctrl+F10 in ZOC's main window.
Let us assume you want to start a modem session on COM3 with 57600 bps, RTS/CTS and Valid-CD set to on and a break time of 350ms.
1. Go to Options, Session Profile, Device, select SERIAL/MODEM and the set the options.
2. Close the Options window
3. Press Shift+Ctrl+F10
4. The device status output will show the current device-parameter field "[1]COM3:57600-8N1|9|350" which you can use as a parameter to the ZocSetDevParm command.

Example:
/* SET SERIAL PARAMETERS TO COM3,
   57600-8N1, RTS/CTS, Valid-CD, 350ms */
CALL ZocSetDevParm "[1]COM3:57600-8N1|9|350"

Example:
/* SELECT TELNET AND SET OPTIONS TO
   "START SESSION WITH LOCAL ECHO" */
CALL ZocSetDevice "TELNET"
CALL ZocSetDevParm "[3]12"

ZocSetOption "<key>=<value>"
Sets a ZOC option (any from the Options, Session Profile window) from a key-value pair.  To find out more about the key-value pairs, please check the file OPTIONS\STANDARD.ZOC (or any other options file that was created by the Options, Save-As dialog).  The file contains all the key-value pairs, that make up your current configuration.
If you are not sure what the value of a certain key means, just set the option you want in the options window, then click Save and check the options file for the new key-value pair.  You can also contact EmTec customer support if you have specific questions about a key or value.
See also: ZocGetOption

Example:
CALL ZocSetOption "JumpScroll=3"
CALL ZocSetOption "ShowChat=no"
CALL ZocSetOption 'MdmIni="ATZ^M"'  /* watch the quotes! */

Note: ZocSetOption/ZocGetOption will only work for options from the Options, Session Profile dialog.  To change program settings, use ZocSetProgramOption.

ZocSetProgramOption "<key>=<value>"
Similar to ZocSetOption, this command modifies a ZOC Program setting (ZocSetOption modifies session profile).  The function basically works the same as ZocSetOption but the underlying file that contains the key-value pairs is OPTIONS\STANDARD.CFG.  The key names are mostly self explanatory. However, if you have problems with a certain key or value, please contact EmTec.

Example:
CALL ZocSetProgramOption "SafAskClrCapt=yes"
CALL ZocSetProgramOption 'ScriptPath="script"'  /* watch the quotes! */

ZocSetHostEntry "name", "<key>=<value>"
Sets a value for a host directory entry from a key-value pair.  To find out more about the key-value pairs, please check the file PHONEBK with an editor. The file contains all the key-value pairs, that make up your host directory.
See also: ZocSetOption, ZocGetHostEntry()

Example:
CALL ZocSetOption "MyBBS", "emu=1"
pair= ZocGetOption("ZOC Support BBS", "calls")
PARSE VALUE pair WITH key"="value
value= value+1
CALL ZocSetHostEntry "ZOC Support BBS", "calls="||value

value= "3781302"
CALL ZocSetHostEntry "ZOC Support BBS", 'number="'||value||'"'

ZocSetTimer <hh:mm:ss>
Set timer to given time.

Example:
CALL ZocSetTimer "00:00:20"

ZocSetUnit <character>
Change the phone cost calculator to the entry that corresponds with the given character.

Example:
CALL ZocSetUnit "C"

ZocSetUnattended 0|1
Enable or disable ZOC's unattended mode (same as /U command line parameter).

Example:
CALL ZocSetUnattended 1

ZocShell <command>, [<viewmode>]
Execute a command or program in a shell window via 'CMD.EXE /C <command>'. This is similar to using ADDRESS CMD "<command>".
The optional viewmode parameter controls how the black shell window is shown: 0= normal, 1= hidden, 2= minimized, 3= maximized.

Example:
CALL ZocShell "DEL FILE.TMP"

See also: ZocExec, ZocFileDelete, ZocFileRename

ZocString(<subcommand>, <inputstring>, <p1>, [<p2>])
This is a function to manipulate a string and return a modified copy. The subcommand and the parameters <p1> and <p2> control the modification.

Subcommands:

PART
Return the <p1>th part <inputstring> which is delimited by <p2> (or space if <p2> is omitted), e.G. ZocString("PART", "Anne|Charly|Joe", 2, "|") will return "Charly".

PARTCOUNT
Return the number of <p2>-delimited parts in <inputstring>, e.G. ZocString("PARTCOUNT", "Anne|Charly|Joe", "|")  will return 3.

REPLACE
Return a copy of <inputstring> where all ocurrences of <p1> are replaced by <p2>, e.G. betterstr= ZocString("REPLACE", str, "HyperTerminal", "ZOC")

REMOVE
Return a copy of <inputstring> where all ocurrences of <p1> are removed, e.G. betterstr= ZocString("REMOVE", str, "HyperTerminal")

REMOVECHARS
Return a copy of <inputstring> from which all characters of <p1> were removed, e.G. str= ZocString("REMOVECHARS", str, "0123456789"||X2C(09)) removes all digits and tab characters from STR.

ZocSuppressOutput 0|1
Enables or disables suppressing of screen output.  This command allows you to send/receive characters without any screen activity.  Logging to the capture buffer and to file is also suppressed.
Output suppression is automatically reset to normal when the script ends or upon disconnecting from a host.

ZocSynctime <time> [, <mode>]
Because REXX programs are running parallel to ZOC, ZOC may receive and process more incoming data while REXX is doing it's own work. This means that it is possible that text, which you are going to wait for, has already scrolled by.  A typical example for this is a loop that processes all incoming lines of text.

Example:
DO FOREVER
    timeout= ZocGetLine()
    IF timeout\=640 THEN DO
        line= ZocLastLine()
        /* line is processed here */
    END
END

In this example ZOC might receive more text while the REXX programm processes the data in ZocLastLine().
To address this problem, ZOC is suspended after a string was found, thus giving the REXX program time to work on the data until it is ready for the next command.
ZOC will then resume to process incoming data either if the REXX program issues another ZOC command (like ZocWait, ZocSend, etc.) or after the sync time has elapsed (default is 250ms).

Example:
CALL ZocSynctime 500

If you need to run other Zoc-commands (like ZocWriteln, ZocFile, ...) to process the data and still want to hold back the main program until you are ready to process another ZocWait command, you can add a mode parameter of 1 to the ZocSynctime command.  In this case, after a successful Wait command, ZOC will only resume to process incoming data if either the time elapsed, if another ZocWait/ZocWaitMux/ZocGetLine is issued or if a ZocDelay command is executed.

Example:
CALL ZocSynctime 250, 1

ZocTerminate [<return-code>]
Tell ZOC to terminate (ie. return to the shell or desktop) after the REXX program ended.  Normally an EXIT command will follow ZocTerminate.  If you supply the return-code parameter,  ZOC will return this value to the calling program (typically a batch file that checks the ERRORLEVEL to determine if everything was ok).

Example:
CALL ZocTerminate
EXIT

ZocTimeout <sec>
Set max. time to wait for a ZocWait command (see also: ZocWait, ZocWaitMux, ZocGetLine).

Example:
CALL ZocTimeout 60

ZocUpload <protocol>[:<options>] <file>
Start an upload.  Only one file name can be supplied.  However, the filename may contain wildcard characters.  If the filename contains no path at all it is taken from the standard upload directory, otherwise, if the path is relative, it is accessed based on ZOC's working directory.
The protocol name is BINARY, ASCII or the name of a file transfer protocol from the Options, Transfer dialog, eg. Zmodem or Kermit.
If ZocUpload is called as a function, it returns the string ##OK## or ##ERROR##.

Example:
CALL ZocUpload "ZMODEM", "REPQWK\ZOCBBS.REP"
 uploads C:\COMM\ZOC\REPQWK\ZOCBBS.REP via Zmodem protocol.

Example:
success= ZocUpload("XMODEM", "ZOC.ZIP")
 uploads ZOC.ZIP (from the upload dir) via Xmodem protocol and obtains a success indicator (##OK## or ##ERROR##).

Example:
CALL ZocUpload "BINARY", "CNC-CONTROL.DAT"
 sends the contents of the file directly without any translation or protocol.

Example:
CALL ZocUpload "ASCII:0+10", "\FAR\AWAY\LIST.TXT"
 uploads LIST.TXT via ascii transfer without CR/LF translation and ascii delay of 10.

Example:
CALL ZocUpload "ASCII:1+3", "HERE\SOME.DATA"
 uploads the file SOME.DATA via ascii transfer with CR/LF translation and ascii delay of 3.
The optional options are set by using a string that configures that protocol.  Valid strings can be obtained, if you set your protocol options in ZOC's Options, Transfer dialog, press Save and then edit the OPTIONS\STANDARD.ZOC file on your hard disk.  The [OPTS_TRANSFER] section will contain an ActiveTransfer=n entry (eg. n=2 for Zmodem) and a list of entries named TransferOpts#nn which belongs to one file transfer protocol each.
Example: If you want to make a transfer via Xmodem with CRC and 1KB blocks, you'd define these options in ZOC's Transfer dialog.  Then, looking at the OPTIONS\STANDARD.ZOC file with an editor, you would find (among others) the following lines:

ActiveTransfer=0
TransferOpts#00="[0]kc"

Hence, to make an upload with the Xmodem protocol, configured for CRC and 1KB blocks, you would use the command CALL ZocUpload "XMODEM:[0]kc", "datafile.zip" or just CALL ZocUpload "XMODEM:kc", "datafile.zip"

Important: The options are case sensitive!

ZocWait(<text>)
Wait for the given text (see also: ZocGetLine, ZocSyncTime, ZocTimeout, ZocWaitMux, ZocWaitForSeq). If ZocWait times out, it returns a value of 640.

Example:
timeout= ZocWait("Password")
IF timeout=640 THEN SIGNAL PANIC

Note: ZOC automatically filters ANSI/VTxxx/etc. control codes from the data stream, so they do not interfere with the ZocWait command.

Note: If you are using the CEPT (German T-Online) emulation, you can use
Call ZocWait "^Z"
 to wait for the next data input opportunity.

Note: If you are using ZocWait from a DDE controller, the command must be sent as via request rather than via execute!

ZocWaitForSeq 1|0
Normally ZocWait commands do not see emulation control codes in the data stream.  If you need to wait for an emulation control you can use this command.  This flag also turns on/off filtering of emulation controls for ZocReceiveBuf().

ZocWaitMux(<text0> [, <text1> ...])
Wait for one of multiple texts in the input data stream.  It is satisfied if one of the given texts is found in the incoming data stream (and is typically used within a loop).  The return code provides information about which text was found (0, 1, 2 ...) or if the command timed out (return code 640).

Note: The length of all texts together must not exceed 2048 characters.

Note: This command uses some extra CPU time (depending on the number and combined and length of text you are waiting for).

Note: See also ZocWait, ZocGetLine, ZocTimeout, ZocSyncTime

Example:
result= ZocWaitMux("You have mail", "Main Menu")
SELECT
    WHEN result=0 THEN CALL MAILDOWNLOAD
    WHEN result=1 THEN LEAVE
    WHEN result=640 THEN SIGNAL TIMEOUT
END

ZocWindowState(MINIMIZE|MAXIMIZE|RESTORE|ACTIVATE|<other>)
Set the State of ZOC's main window to the state given.  In function call syntax, the new state of the window will be returned.  Any other string than the ones above will be ignored and will just return the current window state as MINIMIZED, MAXIMIZED, RESTORED (please note the extra letter D at the end).

Example:
now= ZocWindowState("QUERY")
if now\="MINIMIZED" then do
Call ZocWindowState "MINIMIZE"
end

ZocWrite <text>
Write text to screen.  This command is similar to REXX's native SAY command, but it does not place the cursor in the next line after printing the text and it understands control characters like ^M (Enter) or ^[ (ESC).

Example:
CALL ZocWrite "Hello ^[[1m World^[[0m"

ZocWriteln <text>
Write text to screen and skip to the next line. This command is similar to the REXX SAY command, but resolves control codes (eg. ^M).

Example:
CALL ZocWriteln "Hello ^M^J World"

Example:
SAY "Hello"||X2C(0D)||X2C(0A)||"World"

ZocXferShell <command>
OS/2 only: Start an external protocol in a Transfer Shell.

Example:
name= ZocGetFilename("File to upload")
IF name\="##CANCEL##" THEN DO
    CALL ZocXferShell "CD \CKERMIT & CKERMIT -l %ZocHfc% -s "||file
END

ZocXferDosSHell <command>
Start an external protocol in a Transfer DOS-Shell.

Example:
name= ZocGetFilename("File to upload")
IF name\="##CANCEL##" THEN DO
    CALL ZocXferDosShell "C:\DOSCOMM\DSZ\DSZ port 2 sz "||file
END

Obsolete Functions:

ZocCaptClr
Replaced by ZocCommand("CLEARSCROLLBACK").

ZocCarrier()
Replaced by ZocGetInfo("ONLINE").

ZocCursor
Replaced by ZocGetInfo("CURSOR-X") and ZocGetInfo("CURSOR-Y").

ZocEndZoc()
Replaced by ZocTerminate.

ZocGetPhonebk
Renamed to ZocGetHostEntry

ZocHfc
Replaced by ZocGetInfo("COMHANDLE").

ZocLockKeyboard
Replaced by ZocKeyboard("LOCK") and ZocKeyboard("UNLOCK").

ZocOs
Replaced by ZocGetInfo("OSYS").

ZocPID
Replaced by ZocGetInfo("PROCESSID").

ZocRestimer
Replaced by ZocSetTimer("00:00:00").

ZocScreen
Please use ZocGetScreen instead.

ZocSendBreak
Replaced by ZocCommand("SENDBREAK").

ZocSendKey <number>
Plesase use ZocGetOption and ZocSend instead.

ZocSetDlPath
Please use CALL ZocSetProgramOption "DownloadPath=<path>" instead.

ZocSetPhonebk
Renamed to ZocSetHostEntry

ZocSetEmu
Please use CALL ZocSetOption "ActiveEmulation=<emu-id>" instead.

ZocSetHost 0|1
Please use CALL ZocSetOption "Host=yes|no" instead.


Common Questions (How-To Guide)

Please also check Quick Start Guide and Trouble Shooting Guide.

Where do I get the current version of ZOC?
Please click here for places to get updates.

How can I set ZOC as the default Telnet app. in MS Internet Explorer?
Open the Windows Explorer (not Internet Explorer) and go to View, Options ,  File-Types then select URL-Telnet, Edit, Open, Edit and set the Application to C:\Programme\Zoc\Zoc.exe %l (percent lowercase-L at the end).

How can I use ZOC as a Telnet app. in Netscape Navigator?
Windows: Simply put a call to ZOC in Netscape 3.0's General-Options, Applications, Telnet field like this:  C:\ZOC\ZOC.EXE /Telnet: (of course you have to enter the directory where ZOC is installed on your drive).  In Netscape Communicator 4.0 go to Options, Navigator, Applications, URL Telnet and set it to C:\ZOC\ZOC.EXE /%1 or C:\ZOC\ZOC.EXE /TELNET:%1 [depending on your Netscape Version]
OS/2: Write a CMD file (e.g. C:\ZOC\ZOCTLNET.CMD) which calls ZOC with the %1 parameter (e.g. C:\ZOC\ZOC.EXE %1 or C:\ZOC\ZOC.EXE /TELNET:%1 depending on your Netscape Version) and use the name of that CMD file in Netscape as the name of the Telnet application (e.g. C:\ZOC\ZOCTLNET.CMD).

How can I install ZOC on a LAN?
Please check Network and System/Network Administrators

How can I disable Telnet/SSH reverse DNS lookup
Go to Options, Session Profile, Device, Telnet, Global Options and enable 'No reverse DNS lookup'.

What is necessary to use the ISDN module with X.25/X.31?
Please go to the device options, select ISDN CAPI 2.0 and press the help button.  Also, please be aware, that for use with X.31 you probably need to have that feature enabled by your telco.

How can I use the same host directory at home and at work?
Create two options files (maybe named HOMEOPT and WORKOPT) and save them via Options, Save-As.  In WORKOPT you can change the Options, Modem, Dial-String to ATDT 9,^#^M and change whatever else differs (like different modem init strings).  Then set up two ZOC icons on the desktop, one with /O:OPTIONS\WORKOPT and the other with /O:OPTIONS\HOMEOPT in the parameter field.

How can I set up ZOC for modem tone dialing
Change the modem options and set the dialing command to 'ATDT'.

How can I call the German T-Online/BTX service with ZOC
Create a host directory entry and set the device to MODEM/SERIAL or ISDN (use ISDN's BTX-Telematic option).  Enter 01910 as phone number, then set the emulation to CEPT and enable the 'Learn AutoLogin next time' switch. When the login screen is shown, enter your Anschlußkennung.  At the next screen press Enter at the prompt for the Anschlußnummer, enter 0001 as Mitbenutzernummer and enter the password.  After pressing Enter again, select Stop-Recording from the Script menu.  T-Online's * key can be sent from ZOC's * or F9 key.  The # key can be sent from ZOC's Enter or F10 key.
To access your favourite T-Online pages, you can learn REXX scripts from the Script menu (it is a good idea to start all scripts with *0# to start from T-Online's main menu).  Of course, you can map the REXX scripts to F-Keys or User-Buttons (see Power Codes).
To wait for an input prompt, use

Example:
Call ZocWait "^Z"

How do I use Telnet or ISDN
Please check the Device Help

How do I install ZOC for Windows and OS/2 on the same machine?
If you have OS/2 and Windows installed on your machine and if you want to share the ZOC configuration files between both installations, you need a hard drive or partition that can be accessed from both operating systems (eg. drive D:).
Then install ZOC for both operating systems on that drive but in different directories (eg. in D:\ZOCWIN and D:\ZOCOS2).  After that, start and configure ZOC for the operating system which you will use mostly.  To use that configuration from the other operating system, modify the ZOC icon there and add a /WD: parameter that points to the other directory:
If you are mainly using ZOC for Windows, put /WD:D:\ZOCWIN into the Parameter field in the ZOC for OS/2 icon.  If you mainly use OS/2, then put D:\ZOCWIN\ZOC.EXE /WD:D:\ZOCOS2 into the target field in the Windows ZOC icon.

How can I run ZOC and OS/2 FaxWorks simultaneously
There is a file called SCRIPT\ZOCEVENT.ZRX which is able to switch off FaxWorks' receive mode when ZOC is started (and switch it back on when ZOC is closed).  Please see the file itself for further instructions.


Common Problems and Questions (Trouble Shooting Guide)

Please also check the PROBLEMS.DOC file for possible problems and solutions and the How-To Guide.

I cannot start ZOC from another directory
Under Windows add the ZOC directory to the PATH.  Under OS/2 add the ZOC directory to your LIBPATH statement in OS/2's CONFIG.SYS.

I cannot find a way to use Telnet
The Telnet device should be in the device list in Options, Device or Host Directory, Edit.  However, ZOC does not offer Telnet unless TCP/IP networking is installed.   Under OS/2 this means that the file TCP32DLL.DLL, SO32DLL.DLL and FTPAPI.DLL (for Telnet) must be available in a directory of yur LIBPATH.

Zmodem file transfers with the Telnet device fail
Please play around with the telnet-options in Options, Device, Device-Opts or Host Directory, Edit, Device-Setup (especially with the CR/NUL options).

I cannot connect using Windows-Modems (TAPI)
ZOC does not use Window's Local Settings, which means that you have to type the phone number exactly as you want it to be dialled (including digits to get an outside line or to dial long distance).

ZOC cannot open the COM port while other programs can
Please also check the information in Devices Serial/Modem
Please make sure that the COM port is available by typing MODE COMx (where x is the number of the port) at a command prompt.
If this does not result in an error message, make sure that you typed the com port's name correctly in ZOC.  Especially do not use blank characters between COM and the number.
OS/2If you get an error message from MODE COMx make sure the com port is configured correctly in your OS/2 CONFIG.SYS (to get details type HELP COM.SYS at an OS/2 command prompt) or in your Windows control panel (ports).
If the error message appears because the com port is used by the Internet dialer, you can configure ZOC to use Telnet or Named Pipe by default and set the devices in the individual host directory entries.  This way ZOC will not access the com port after starting.

I keep getting a "No CTS from modem" message
To prevent ZOC and the modem to overrun each others buffers at times, both should be configured to support the so called RTS/CTS handshake.  This is especially necessary with transfer speeds of 9600 bps and more.  Unlike some other comm programs, ZOC insists on getting the according signal from the modem if you communicate at speeds higher than 9600 bps. Hence ZOC issues a warning if the CTS signal from the modem cannot be detected.  If you get this warning, please check that your modem is configured to supply the CTS command (eg. by using the modem's factory settings), that you are using a 7-wire cable (and adaptor) between the modem and the PC and that you are using the correct COM-port in Options, Device and/or in Host Directory, Edit, Device, Device options.

Sometimes ZOC hangs after starting or when sending to the COM port
Try to disable DSR handshake in the Serial-Device options.

ZOC behaves unreliably when making connections or transferring files
Sometimes this is caused by an interrupt conflict (check your interrupt settings for sound card, ethernet boards and COM.SYS).  There are also known problems with COM.SYS in OS/2 Warp (see file PROBLEMS.DOC).

My modem works properly with other terminal software but not with ZOC
Try using the same modem initialization as in the other terminal package. Or store that modem configuration into the non-volatile memory of the modem (mostly done with AT&W) and use ATZ as the initialization string for ZOC.

I cannot get a Zoom modem to initialize properly with the Serial/Modem device
To work with a Zoom modem, please use the modem init string AT&F&C1&K3\N3

ZOC does not show an ISDN-Device under Windows
You need CAPI V2.0 drivers from your board manufacturer, which comes with nearly all ISDN boards.

ZOC does not show an ISDN-Device under OS/2
ZOC needs access to the files CAPI.DLL (for CAPI V1.1) or CAPI20.DLL (for CAPI V2.0) which must be supplied from your board manufacturer.  Please make sure that the directories where the files reside are listed in the LIBPATH statement of your CONFIG.SYS

ISDN can be selected, but connections fail
You are probably using a CAPI2032.DLL which does not work with your current drivers, e.g. CAPI2032.DLL from Windows, together with drivers from your board. Also, please set the communication parameters to STANDARD (there is an Standard button in Options, Session Profile, Device, ISDN) and save the options. Also make sure, that this kind of setting is made in all your ISDN phone book entries. If you still experience problems, please try to reinstall your ISDN drivers and make sure that you are using the latest driver kit from your manufacturer.

ISDN can be selected, but no AT commands can be entered
This is normal, because ZOC does not simulate a modem, but accesses the ISDN board directly.  To call a BBS, please use the File, Manual Connection command, or create a host directory entry.

ZOC increases the call counter for several host directory entries at a time
This is a feature to maintain multi phone port BBSs.  Details are described under Name in editing host directory entries.

No characters appear after making a connection
You use a secured transmission and the modem waits to get an OK signal from the computer which does not come. Turn on RTS/CTS in Options, Device.

Zmodem uploads to Unix-RZ do not start at all or fail
Try to use the -e, -eb or -v option on Unix's side: rz -e, rz -eb  or rz -v
If your connection is routed through a Xyplex concentrator, there currently is no known method to make Zmodem uploads at all.  You will have to use another protocol -- best choice in this case is probably CKERMIT used from a transfer shell from ZOC (please search the help file for CKERMIT to get details).

Downloads generally work fine, but uploads of large files fail
Probably you are using a high-speed modem but have RTS/CTS disabled. For high-speed transmission both, the modem and ZOC, need to be configured to use RTS/CTS handshaking.

After downloads the time setting of files is off by a few hours
Please check the discussion of the TZ environment variable in the starter section of this file or set the 'Ignore time stamp' option in Transfer Options.

If a menu is open when a file transfer ends, ZOC hangs
This is a known problem.  Please avoid this situation.

The text "CIS-B ENQ received" appears during a session
Your host is sending a code that CompuServe normally uses to initiate file transfers. Go to the Transfer options and disable the enquiry in the CompuServe-B+ setup.  If this problem occurs during CompuServe login, go to the CompuServe setup and disable the item 'Micro Inquiry'.

The cursor keys do not work in some VT102/VT220 applications
You should use the gray cursor keys, not the numeric keypad.  The keypad is used for other purposes by these applications.

I cannot access user defined F-Macro keys in some emulation
The F-Macros are needed for the emulation of an VT220 terminal.  Please see VT220 in Emulation Options.

Keyboard redefinition does not work
Please note that the keyboard redefinition takes the NumLock state into account.  So you might have to redefine a key twice (with NumLock on and off).

Sometimes the keyboard quits working while the mouse still works ok
Probably one of the qualifier keys (alt/ctrl/shift) got stuck.  Pressing all these keys once usually helps.

Whenever I leave the program I get a Carrier Detect warning
Maybe your modem is configured to have the CD signal always on.  Set it to match the CD state (maybe AT&C1) or set the CD signal to 'invalid' in the serial options.

Sizing the ZOC window only works in large steps
By default ZOC changes the font size when you size the window.  Since the font is not available in every necessary size ZOC will use a best-fit method and size the window accordingly.  If you do not like this, you can change the sizing behavior in the Window Options.

I would like to use more fonts for ZOC
ZOC checks all available fonts in the system to find the ones that could be used for the terminal window.  For use in ZOC all characters in the font must have the same width and must support the selected code page. Under Windows the Courier New, Lucida Console and Terminal fonts meet this requirement.  If you do not see the Terminal font in ZOC's font list, please make sure that the 'Show only true type fonts ...' setting in My Computer, Control Panel, Fonts, View, Options, True Type is not selected.

I miss a full screen mode
There is no character based full screen mode available.  ZOC is a graphical program and uses the benefits of the graphical user interface (like offering icons).  However, you can maximize the ZOC window using the maximize button in the title bar.  This way ZOC will cover the whole screen (you should select a large font if you do this).

Scrolling is slow
Scrolling in an window is generally slower that in full screen mode. There is a scroll speed option in Options, Window.

The ANSI emulation sometimes shows garbage characters
Have you checked if the host is accidentally set to Avatar+ emulation (instead of ANSI)?

Is there a host mode?
Yes.  It is implemented as a REXX program.  To start it select Script, Start Script and select MINIHOST.ZRX.  The program will prompt you for two passwords (for guest and supervisor mode) and will then wait for incoming calls.

What does ZOC mean?
The Hitchhikers Guide to the Galaxy might describe ZOC as followed:
zoc (v), to zoc means communicating with other people through the means of extremely sophisticated hard- and software (sophisticated at least from the viewpoint of the ape-descended inhabitants of an extremely unimportant blue planet in an even lesser important part of the galaxy who think that personal computers are a pretty neat pieces of hardware).

OS/2 specific problems

Sometimes ZOC crashes for no apparent reason
OS/2 only: Please try to delete (or better rename) the file ZOCWAV.DLL in the ZOC directory.  If this helps, please reinstall MMPM.

Only starting ZOC for the first time after reboot works
This is very likely a problem with your OS/2 comm driver (COM.SYS). Please try to find an updated version (which exists for OS/2 Warp) or try the shareware SIO.SYS.

Or try to reinstall ZOC into a fresh directory without converting options from an earlier version.

The STANDARD.ZOC options are not used at startup
Maybe you unpacked ZOC without preserving pathnames.  The STANDARD.ZOC file must be in a subdirectory named OPTIONS (and located in your ZOC directory, e.g. C:\TERM\ZOC\OPTIONS).

Internal Error I0487
This is an OS/2 bug.  Please try to delete (or REM out) a SET command in your CONFIG.SYS (e.g. REM SET GLOSSARY=....) or add an arbitrary set command (e.g. SET ADVICE=IF IN DOUBT, ASK DON SHIMODA). Then reboot and try again.

Error SYS3175 when starting a shell or editor from ZOC or when starting a file transfer
See above (I0487).

When uploading, ZOC corrects errors only at the end of the transfer
Problem with OS2 only: Please turn off the high priority setting in Options, Transfer Page 2.


Credits

We would like to thank Alfredo Sola for a bunch of good ideas and for working with more concurrent ZOC windows than any other person we know of. Bob Harris for testing the 3270 and for a couple of bags of Beef Jerkey.

Frank Burleigh for innumerous suggestions/improvements regarding the help text and the program. Hans-Juergen Rauscher for writing ZOCBK (for ZOC 1.xx). Jay Sottolano for his encouragement in the very early stages of the program. Jim Himmelman for his support on the FIDO network. John McNamara for running the help file through the spell checker twice. Nicole Greiber for proofreading the help file. Rod Smith for his support on the usenet during the 911-affair and later. Richard Ashton for his support on the FIDO net during the 911-affair. Siegfried Bauer for the information about the Telix phon import (in ZOC 3.xx). Thomas Schueppel for helping me to make named pipes work under Windows. Tom Hansen and Jim LaSalle for downloading ZOC from Germany to help me to find the Cirrus driver workaround.

Not to forget all the people who's names got lost in a hard disk havoc who helped ZOC to become a success through their innumerous bug reports and suggestions via email and fax.

And thanks to Douglas Adams, Richard Bach, Jane Roberts, Brian Eno, Frank Zappa, Igor Stravinsky, Philip Glass, Barbra Streisand, Jim Steinman and Meat Loaf, Chivas Brother Ltd, Pizzeria Rimini and several Ceylonese Tea Producers for caring about our mental and physical needs.

Markus Schmidt
Markus Gömmel